home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre2.z / postgre2
Tape Archive  |  1993-05-07  |  3.9 MB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Tape Archive (archive/tar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file POSIX tar archive (GNU) default
99% file POSIX tar archive (GNU), file COPYRIGHT, mode 644 , uid 6 , gid 0 , size 1700 , seconds 5247100151, user postgres, group system default
98% file data default
62% TrID TAR - Tape ARchive (GNU) default
37% TrID TAR - Tape ARchive (file) default
100% siegfried x-fmt/265 Tape Archive Format default
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype GNU tar archive default
100% detectItEasy Archive: tar default
100% binwalkID POSIX tar archive (GNU), owner user name: "T" default
100% xdgMime application/x-tar default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 43 4f 50 59 52 49 47 48 | 54 00 00 00 00 00 00 00 |COPYRIGH|T.......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00000070| 20 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 6 . | 0 . |
|00000080| 20 20 20 31 37 30 30 20 | 20 35 32 34 37 31 30 30 | 1700 | 5247100|
|00000090| 31 35 31 20 20 31 31 35 | 37 32 00 20 30 00 00 00 |151 115|72. 0...|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 75 73 74 61 72 20 20 | 00 70 6f 73 74 67 72 65 |.ustar |.postgre|
|00000110| 73 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 73 79 73 74 65 6d 00 |........|.system.|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 50 4f 53 54 47 52 45 53 | 20 44 61 74 61 20 42 61 |POSTGRES| Data Ba|
|00000210| 73 65 20 4d 61 6e 61 67 | 65 6d 65 6e 74 20 53 79 |se Manag|ement Sy|
|00000220| 73 74 65 6d 0a 0a 43 6f | 70 79 72 69 67 68 74 20 |stem..Co|pyright |
|00000230| 28 63 29 20 31 39 38 39 | 20 52 65 67 65 6e 74 73 |(c) 1989| Regents|
|00000240| 20 6f 66 20 74 68 65 20 | 55 6e 69 76 65 72 73 69 | of the |Universi|
|00000250| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00000260| 0a 0a 50 65 72 6d 69 73 | 73 69 6f 6e 20 74 6f 20 |..Permis|sion to |
|00000270| 75 73 65 2c 20 63 6f 70 | 79 2c 20 6d 6f 64 69 66 |use, cop|y, modif|
|00000280| 79 2c 20 61 6e 64 20 64 | 69 73 74 72 69 62 75 74 |y, and d|istribut|
|00000290| 65 20 74 68 69 73 20 73 | 6f 66 74 77 61 72 65 20 |e this s|oftware |
|000002a0| 61 6e 64 20 69 74 73 0a | 64 6f 63 75 6d 65 6e 74 |and its.|document|
|000002b0| 61 74 69 6f 6e 20 66 6f | 72 20 65 64 75 63 61 74 |ation fo|r educat|
|000002c0| 69 6f 6e 61 6c 2c 20 72 | 65 73 65 61 72 63 68 2c |ional, r|esearch,|
|000002d0| 20 61 6e 64 20 6e 6f 6e | 2d 70 72 6f 66 69 74 20 | and non|-profit |
|000002e0| 70 75 72 70 6f 73 65 73 | 20 61 6e 64 0a 77 69 74 |purposes| and.wit|
|000002f0| 68 6f 75 74 20 66 65 65 | 20 69 73 20 68 65 72 65 |hout fee| is here|
|00000300| 62 79 20 67 72 61 6e 74 | 65 64 2c 20 70 72 6f 76 |by grant|ed, prov|
|00000310| 69 64 65 64 20 74 68 61 | 74 20 74 68 65 20 61 62 |ided tha|t the ab|
|00000320| 6f 76 65 20 63 6f 70 79 | 72 69 67 68 74 0a 6e 6f |ove copy|right.no|
|00000330| 74 69 63 65 20 61 70 70 | 65 61 72 20 69 6e 20 61 |tice app|ear in a|
|00000340| 6c 6c 20 63 6f 70 69 65 | 73 20 61 6e 64 20 74 68 |ll copie|s and th|
|00000350| 61 74 20 62 6f 74 68 20 | 74 68 61 74 20 63 6f 70 |at both |that cop|
|00000360| 79 72 69 67 68 74 20 6e | 6f 74 69 63 65 20 61 6e |yright n|otice an|
|00000370| 64 0a 74 68 69 73 20 70 | 65 72 6d 69 73 73 69 6f |d.this p|ermissio|
|00000380| 6e 20 6e 6f 74 69 63 65 | 20 61 70 70 65 61 72 20 |n notice| appear |
|00000390| 69 6e 20 73 75 70 70 6f | 72 74 69 6e 67 20 64 6f |in suppo|rting do|
|000003a0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2c 20 61 6e 64 |cumentat|ion, and|
|000003b0| 20 74 68 61 74 0a 74 68 | 65 20 6e 61 6d 65 20 6f | that.th|e name o|
|000003c0| 66 20 74 68 65 20 55 6e | 69 76 65 72 73 69 74 79 |f the Un|iversity|
|000003d0| 20 6f 66 20 43 61 6c 69 | 66 6f 72 6e 69 61 20 6e | of Cali|fornia n|
|000003e0| 6f 74 20 62 65 20 75 73 | 65 64 20 69 6e 20 61 64 |ot be us|ed in ad|
|000003f0| 76 65 72 74 69 73 69 6e | 67 0a 6f 72 20 70 75 62 |vertisin|g.or pub|
|00000400| 6c 69 63 69 74 79 20 70 | 65 72 74 61 69 6e 69 6e |licity p|ertainin|
|00000410| 67 20 74 6f 20 64 69 73 | 74 72 69 62 75 74 69 6f |g to dis|tributio|
|00000420| 6e 20 6f 66 20 74 68 65 | 20 73 6f 66 74 77 61 72 |n of the| softwar|
|00000430| 65 20 77 69 74 68 6f 75 | 74 0a 73 70 65 63 69 66 |e withou|t.specif|
|00000440| 69 63 2c 20 77 72 69 74 | 74 65 6e 20 70 72 69 6f |ic, writ|ten prio|
|00000450| 72 20 70 65 72 6d 69 73 | 73 69 6f 6e 2e 20 20 50 |r permis|sion. P|
|00000460| 65 72 6d 69 73 73 69 6f | 6e 20 74 6f 20 69 6e 63 |ermissio|n to inc|
|00000470| 6f 72 70 6f 72 61 74 65 | 20 74 68 69 73 0a 73 6f |orporate| this.so|
|00000480| 66 74 77 61 72 65 20 69 | 6e 74 6f 20 63 6f 6d 6d |ftware i|nto comm|
|00000490| 65 72 63 69 61 6c 20 70 | 72 6f 64 75 63 74 73 20 |ercial p|roducts |
|000004a0| 63 61 6e 20 62 65 20 6f | 62 74 61 69 6e 65 64 20 |can be o|btained |
|000004b0| 66 72 6f 6d 20 74 68 65 | 20 43 61 6d 70 75 73 0a |from the| Campus.|
|000004c0| 53 6f 66 74 77 61 72 65 | 20 4f 66 66 69 63 65 2c |Software| Office,|
|000004d0| 20 32 39 35 20 45 76 61 | 6e 73 20 48 61 6c 6c 2c | 295 Eva|ns Hall,|
|000004e0| 20 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 43 | Univers|ity of C|
|000004f0| 61 6c 69 66 6f 72 6e 69 | 61 2c 20 42 65 72 6b 65 |aliforni|a, Berke|
|00000500| 6c 65 79 2c 0a 43 61 2e | 2c 20 39 34 37 32 30 2e |ley,.Ca.|, 94720.|
|00000510| 20 20 54 68 65 20 55 6e | 69 76 65 72 73 69 74 79 | The Un|iversity|
|00000520| 20 6f 66 20 43 61 6c 69 | 66 6f 72 6e 69 61 20 6d | of Cali|fornia m|
|00000530| 61 6b 65 73 20 6e 6f 20 | 72 65 70 72 65 73 65 6e |akes no |represen|
|00000540| 74 61 74 69 6f 6e 73 0a | 61 62 6f 75 74 20 74 68 |tations.|about th|
|00000550| 65 20 73 75 69 74 61 62 | 69 6c 69 74 79 20 6f 66 |e suitab|ility of|
|00000560| 20 74 68 69 73 20 73 6f | 66 74 77 61 72 65 20 66 | this so|ftware f|
|00000570| 6f 72 20 61 6e 79 20 70 | 75 72 70 6f 73 65 2e 20 |or any p|urpose. |
|00000580| 20 49 74 20 69 73 0a 70 | 72 6f 76 69 64 65 64 20 | It is.p|rovided |
|00000590| 22 61 73 20 69 73 22 20 | 77 69 74 68 6f 75 74 20 |"as is" |without |
|000005a0| 65 78 70 72 65 73 73 20 | 6f 72 20 69 6d 70 6c 69 |express |or impli|
|000005b0| 65 64 20 77 61 72 72 61 | 6e 74 79 2e 0a 20 0a 0a |ed warra|nty.. ..|
|000005c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000600| 64 6f 63 2f 00 00 00 00 | 00 00 00 00 00 00 00 00 |doc/....|........|
|00000610| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 20 |.... 7|55 . |
|00000670| 20 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 6 . | 0 . |
|00000680| 20 20 20 20 20 20 30 20 | 20 35 33 37 32 33 33 31 | 0 | 5372331|
|00000690| 33 30 33 20 20 31 30 37 | 37 32 00 20 35 00 00 00 |303 107|72. 5...|
|000006a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000700| 00 75 73 74 61 72 20 20 | 00 70 6f 73 74 67 72 65 |.ustar |.postgre|
|00000710| 73 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 73 79 73 74 65 6d 00 |........|.system.|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 64 6f 63 2f 70 61 70 65 | 72 73 2f 00 00 00 00 00 |doc/pape|rs/.....|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 20 |.... 7|55 . |
|00000870| 20 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 6 . | 0 . |
|00000880| 20 20 20 20 20 20 30 20 | 20 35 33 37 32 33 33 31 | 0 | 5372331|
|00000890| 33 30 30 20 20 31 32 32 | 36 31 00 20 35 00 00 00 |300 122|61. 5...|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 75 73 74 61 72 20 20 | 00 70 6f 73 74 67 72 65 |.ustar |.postgre|
|00000910| 73 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 73 79 73 74 65 6d 00 |........|.system.|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 64 6f 63 2f 70 61 70 65 | 72 73 2f 64 65 73 69 67 |doc/pape|rs/desig|
|00000a10| 6e 5f 6f 66 5f 70 6f 73 | 74 00 00 00 00 00 00 00 |n_of_pos|t.......|
|00000a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a60| 00 00 00 00 20 20 20 34 | 34 34 20 00 20 20 20 20 |.... 4|44 . |
|00000a70| 20 36 20 00 20 20 20 20 | 20 30 20 00 20 20 20 20 | 6 . | 0 . |
|00000a80| 20 32 34 30 37 35 30 20 | 20 35 32 34 37 30 37 34 | 240750 | 5247074|
|00000a90| 33 32 34 20 20 31 35 33 | 34 37 00 20 30 00 00 00 |324 153|47. 0...|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b00| 00 75 73 74 61 72 20 20 | 00 70 6f 73 74 67 72 65 |.ustar |.postgre|
|00000b10| 73 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |s.......|........|
|00000b20| 00 00 00 00 00 00 00 00 | 00 73 79 73 74 65 6d 00 |........|.system.|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c00| 2e 6e 72 20 74 70 20 31 | 32 0a 2e 6e 72 20 73 70 |.nr tp 1|2..nr sp|
|00000c10| 20 31 32 0a 2e 6e 72 20 | 70 70 20 31 31 0a 2e 6e | 12..nr |pp 11..n|
|00000c20| 72 20 66 70 20 31 30 0a | 2e 73 7a 20 5c 6e 28 70 |r fp 10.|.sz \n(p|
|00000c30| 70 0a 2e 66 6f 20 27 27 | 25 27 27 0a 2e 28 6c 20 |p..fo ''|%''..(l |
|00000c40| 43 0a 2e 73 7a 20 5c 6e | 28 73 70 0a 2e 62 0a 54 |C..sz \n|(sp..b.T|
|00000c50| 48 45 20 44 45 53 49 47 | 4e 20 4f 46 20 50 4f 53 |HE DESIG|N OF POS|
|00000c60| 54 47 52 45 53 0a 2e 73 | 7a 20 5c 6e 28 70 70 0a |TGRES..s|z \n(pp.|
|00000c70| 2e 73 70 20 33 0a 2e 69 | 0a 4d 69 63 68 61 65 6c |.sp 3..i|.Michael|
|00000c80| 20 53 74 6f 6e 65 62 72 | 61 6b 65 72 20 61 6e 64 | Stonebr|aker and|
|00000c90| 20 4c 61 77 72 65 6e 63 | 65 20 41 2e 20 52 6f 77 | Lawrenc|e A. Row|
|00000ca0| 65 0a 2e 73 70 0a 44 65 | 70 61 72 74 6d 65 6e 74 |e..sp.De|partment|
|00000cb0| 20 6f 66 20 45 6c 65 63 | 74 72 69 63 61 6c 20 45 | of Elec|trical E|
|00000cc0| 6e 67 69 6e 65 65 72 69 | 6e 67 0a 61 6e 64 20 43 |ngineeri|ng.and C|
|00000cd0| 6f 6d 70 75 74 65 72 20 | 53 63 69 65 6e 63 65 73 |omputer |Sciences|
|00000ce0| 0a 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 43 |.Univers|ity of C|
|00000cf0| 61 6c 69 66 6f 72 6e 69 | 61 0a 42 65 72 6b 65 6c |aliforni|a.Berkel|
|00000d00| 65 79 2c 20 43 41 20 39 | 34 37 32 30 0a 2e 73 70 |ey, CA 9|4720..sp|
|00000d10| 0a 2e 72 0a 2e 29 6c 0a | 2e 73 70 20 33 0a 2e 63 |..r..)l.|.sp 3..c|
|00000d20| 65 0a 2e 75 68 20 41 62 | 73 74 72 61 63 74 0a 2e |e..uh Ab|stract..|
|00000d30| 70 70 0a 54 68 69 73 20 | 70 61 70 65 72 20 70 72 |pp.This |paper pr|
|00000d40| 65 73 65 6e 74 73 20 74 | 68 65 20 70 72 65 6c 69 |esents t|he preli|
|00000d50| 6d 69 6e 61 72 79 20 64 | 65 73 69 67 6e 20 6f 66 |minary d|esign of|
|00000d60| 20 61 20 6e 65 77 0a 64 | 61 74 61 62 61 73 65 20 | a new.d|atabase |
|00000d70| 6d 61 6e 61 67 65 6d 65 | 6e 74 20 73 79 73 74 65 |manageme|nt syste|
|00000d80| 6d 2c 20 63 61 6c 6c 65 | 64 20 50 4f 53 54 47 52 |m, calle|d POSTGR|
|00000d90| 45 53 2c 20 0a 74 68 61 | 74 20 69 73 20 74 68 65 |ES, .tha|t is the|
|00000da0| 20 73 75 63 63 65 73 73 | 6f 72 20 74 6f 20 74 68 | success|or to th|
|00000db0| 65 20 49 4e 47 52 45 53 | 20 72 65 6c 61 74 69 6f |e INGRES| relatio|
|00000dc0| 6e 61 6c 20 64 61 74 61 | 62 61 73 65 20 73 79 73 |nal data|base sys|
|00000dd0| 74 65 6d 2e 20 20 0a 54 | 68 65 20 6d 61 69 6e 20 |tem. .T|he main |
|00000de0| 64 65 73 69 67 6e 20 67 | 6f 61 6c 73 20 6f 66 20 |design g|oals of |
|00000df0| 74 68 65 20 6e 65 77 20 | 73 79 73 74 65 6d 20 61 |the new |system a|
|00000e00| 72 65 20 74 6f 3a 0a 2e | 69 6e 20 2b 38 6e 0a 2e |re to:..|in +8n..|
|00000e10| 73 70 0a 2e 74 69 20 2d | 33 6e 0a 31 29 5c 20 70 |sp..ti -|3n.1)\ p|
|00000e20| 72 6f 76 69 64 65 20 62 | 65 74 74 65 72 20 73 75 |rovide b|etter su|
|00000e30| 70 70 6f 72 74 20 66 6f | 72 20 63 6f 6d 70 6c 65 |pport fo|r comple|
|00000e40| 78 20 6f 62 6a 65 63 74 | 73 2c 0a 2e 73 70 20 30 |x object|s,..sp 0|
|00000e50| 2e 35 76 0a 2e 74 69 20 | 2d 33 6e 0a 32 29 5c 20 |.5v..ti |-3n.2)\ |
|00000e60| 70 72 6f 76 69 64 65 20 | 75 73 65 72 20 65 78 74 |provide |user ext|
|00000e70| 65 6e 64 69 62 69 6c 69 | 74 79 20 66 6f 72 20 64 |endibili|ty for d|
|00000e80| 61 74 61 20 74 79 70 65 | 73 2c 20 6f 70 65 72 61 |ata type|s, opera|
|00000e90| 74 6f 72 73 20 61 6e 64 | 20 61 63 63 65 73 73 20 |tors and| access |
|00000ea0| 6d 65 74 68 6f 64 73 2c | 0a 2e 73 70 20 30 2e 35 |methods,|..sp 0.5|
|00000eb0| 76 0a 2e 74 69 20 2d 33 | 6e 0a 33 29 5c 20 70 72 |v..ti -3|n.3)\ pr|
|00000ec0| 6f 76 69 64 65 20 66 61 | 63 69 6c 69 74 69 65 73 |ovide fa|cilities|
|00000ed0| 20 66 6f 72 20 61 63 74 | 69 76 65 20 64 61 74 61 | for act|ive data|
|00000ee0| 62 61 73 65 73 20 28 69 | 2e 65 2e 2c 20 61 6c 65 |bases (i|.e., ale|
|00000ef0| 72 74 65 72 73 20 61 6e | 64 0a 74 72 69 67 67 65 |rters an|d.trigge|
|00000f00| 72 73 29 20 61 6e 64 20 | 69 6e 66 65 72 65 6e 63 |rs) and |inferenc|
|00000f10| 69 6e 67 20 69 6e 63 6c | 75 64 69 6e 67 20 66 6f |ing incl|uding fo|
|00000f20| 72 77 61 72 64 2d 20 61 | 6e 64 20 62 61 63 6b 77 |rward- a|nd backw|
|00000f30| 61 72 64 2d 63 68 61 69 | 6e 69 6e 67 2c 0a 2e 73 |ard-chai|ning,..s|
|00000f40| 70 20 30 2e 35 76 0a 2e | 74 69 20 2d 33 6e 0a 34 |p 0.5v..|ti -3n.4|
|00000f50| 29 5c 20 73 69 6d 70 6c | 69 66 79 20 74 68 65 20 |)\ simpl|ify the |
|00000f60| 44 42 4d 53 20 63 6f 64 | 65 20 66 6f 72 20 63 72 |DBMS cod|e for cr|
|00000f70| 61 73 68 20 72 65 63 6f | 76 65 72 79 2c 0a 2e 73 |ash reco|very,..s|
|00000f80| 70 20 30 2e 35 76 0a 2e | 74 69 20 2d 33 6e 0a 35 |p 0.5v..|ti -3n.5|
|00000f90| 29 5c 20 70 72 6f 64 75 | 63 65 20 61 20 64 65 73 |)\ produ|ce a des|
|00000fa0| 69 67 6e 20 74 68 61 74 | 20 63 61 6e 20 74 61 6b |ign that| can tak|
|00000fb0| 65 20 61 64 76 61 6e 74 | 61 67 65 20 6f 66 0a 6f |e advant|age of.o|
|00000fc0| 70 74 69 63 61 6c 20 64 | 69 73 6b 73 2c 20 77 6f |ptical d|isks, wo|
|00000fd0| 72 6b 73 74 61 74 69 6f | 6e 73 20 63 6f 6d 70 6f |rkstatio|ns compo|
|00000fe0| 73 65 64 20 6f 66 20 6d | 75 6c 74 69 70 6c 65 20 |sed of m|ultiple |
|00000ff0| 74 69 67 68 74 6c 79 2d | 63 6f 75 70 6c 65 64 20 |tightly-|coupled |
|00001000| 70 72 6f 63 65 73 73 6f | 72 73 2c 0a 61 6e 64 20 |processo|rs,.and |
|00001010| 63 75 73 74 6f 6d 20 64 | 65 73 69 67 6e 65 64 20 |custom d|esigned |
|00001020| 56 4c 53 49 20 63 68 69 | 70 73 2c 20 61 6e 64 0a |VLSI chi|ps, and.|
|00001030| 2e 73 70 20 30 2e 35 76 | 0a 2e 74 69 20 2d 33 6e |.sp 0.5v|..ti -3n|
|00001040| 0a 36 29 5c 20 6d 61 6b | 65 20 61 73 20 66 65 77 |.6)\ mak|e as few|
|00001050| 20 63 68 61 6e 67 65 73 | 20 61 73 20 70 6f 73 73 | changes| as poss|
|00001060| 69 62 6c 65 20 28 70 72 | 65 66 65 72 61 62 6c 79 |ible (pr|eferably|
|00001070| 20 6e 6f 6e 65 29 20 74 | 6f 20 74 68 65 20 72 65 | none) t|o the re|
|00001080| 6c 61 74 69 6f 6e 61 6c | 20 6d 6f 64 65 6c 2e 0a |lational| model..|
|00001090| 2e 73 70 0a 2e 69 6e 20 | 2d 38 6e 0a 54 68 65 20 |.sp..in |-8n.The |
|000010a0| 70 61 70 65 72 20 64 65 | 73 63 72 69 62 65 73 20 |paper de|scribes |
|000010b0| 74 68 65 20 71 75 65 72 | 79 20 6c 61 6e 67 75 61 |the quer|y langua|
|000010c0| 67 65 2c 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 0a |ge, prog|ramming.|
|000010d0| 6c 61 6e 67 61 75 67 65 | 20 69 6e 74 65 72 66 61 |langauge| interfa|
|000010e0| 63 65 2c 20 73 79 73 74 | 65 6d 20 61 72 63 68 69 |ce, syst|em archi|
|000010f0| 74 65 63 74 75 72 65 2c | 20 71 75 65 72 79 20 70 |tecture,| query p|
|00001100| 72 6f 63 65 73 73 69 6e | 67 20 73 74 72 61 74 65 |rocessin|g strate|
|00001110| 67 79 2c 20 61 6e 64 20 | 73 74 6f 72 61 67 65 20 |gy, and |storage |
|00001120| 73 79 73 74 65 6d 0a 66 | 6f 72 20 74 68 65 20 6e |system.f|or the n|
|00001130| 65 77 20 73 79 73 74 65 | 6d 2e 0a 2e 73 68 20 31 |ew syste|m...sh 1|
|00001140| 20 20 22 49 4e 54 52 4f | 44 55 43 54 49 4f 4e 22 | "INTRO|DUCTION"|
|00001150| 0a 2e 70 70 0a 54 68 65 | 20 49 4e 47 52 45 53 20 |..pp.The| INGRES |
|00001160| 72 65 6c 61 74 69 6f 6e | 61 6c 20 64 61 74 61 62 |relation|al datab|
|00001170| 61 73 65 20 6d 61 6e 61 | 67 65 6d 65 6e 74 20 73 |ase mana|gement s|
|00001180| 79 73 74 65 6d 20 28 44 | 42 4d 53 29 0a 77 61 73 |ystem (D|BMS).was|
|00001190| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 64 75 72 | impleme|nted dur|
|000011a0| 69 6e 67 20 31 39 37 35 | 2d 31 39 37 37 20 61 74 |ing 1975|-1977 at|
|000011b0| 20 74 68 65 20 55 6e 69 | 76 65 72 69 73 69 74 79 | the Uni|verisity|
|000011c0| 20 6f 66 20 43 61 6c 69 | 66 6f 72 6e 69 61 2e 20 | of Cali|fornia. |
|000011d0| 20 0a 53 69 6e 63 65 20 | 31 39 37 38 20 76 61 72 | .Since |1978 var|
|000011e0| 69 6f 75 73 20 70 72 6f | 74 6f 74 79 70 65 0a 65 |ious pro|totype.e|
|000011f0| 78 74 65 6e 73 69 6f 6e | 73 20 68 61 76 65 20 62 |xtension|s have b|
|00001200| 65 65 6e 20 6d 61 64 65 | 20 74 6f 20 73 75 70 70 |een made| to supp|
|00001210| 6f 72 74 20 64 69 73 74 | 72 69 62 75 74 65 64 20 |ort dist|ributed |
|00001220| 64 61 74 61 62 61 73 65 | 73 20 5b 53 54 4f 4e 38 |database|s [STON8|
|00001230| 33 61 5d 2c 0a 6f 72 64 | 65 72 65 64 20 72 65 6c |3a],.ord|ered rel|
|00001240| 61 74 69 6f 6e 73 20 5b | 53 54 4f 4e 38 33 62 5d |ations [|STON83b]|
|00001250| 2c 20 61 62 73 74 72 61 | 63 74 20 64 61 74 61 20 |, abstra|ct data |
|00001260| 74 79 70 65 73 20 5b 53 | 54 4f 4e 38 33 63 5d 2c |types [S|TON83c],|
|00001270| 0a 61 6e 64 20 51 55 45 | 4c 20 61 73 20 61 20 64 |.and QUE|L as a d|
|00001280| 61 74 61 20 74 79 70 65 | 20 5b 53 54 4f 4e 38 34 |ata type| [STON84|
|00001290| 61 5d 2e 20 20 49 6e 20 | 61 64 64 69 74 69 6f 6e |a]. In |addition|
|000012a0| 2c 20 77 65 20 70 72 6f | 70 6f 73 65 64 20 62 75 |, we pro|posed bu|
|000012b0| 74 20 6e 65 76 65 72 20 | 70 72 6f 74 6f 74 79 70 |t never |prototyp|
|000012c0| 65 64 0a 61 20 6e 65 77 | 20 61 70 70 6c 69 63 61 |ed.a new| applica|
|000012d0| 74 69 6f 6e 20 70 72 6f | 67 72 61 6d 20 69 6e 74 |tion pro|gram int|
|000012e0| 65 72 66 61 63 65 20 5b | 53 54 4f 4e 38 34 62 5d |erface [|STON84b]|
|000012f0| 2e 20 20 0a 54 68 65 20 | 55 6e 69 76 65 72 73 69 |. .The |Universi|
|00001300| 74 79 20 6f 66 20 43 61 | 6c 69 66 6f 72 6e 69 61 |ty of Ca|lifornia|
|00001310| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 49 4e 47 52 | version| of INGR|
|00001320| 45 53 0a 68 61 73 20 62 | 65 65 6e 20 60 60 68 61 |ES.has b|een ``ha|
|00001330| 63 6b 65 64 20 75 70 20 | 65 6e 6f 75 67 68 27 27 |cked up |enough''|
|00001340| 20 74 6f 20 6d 61 6b 65 | 20 74 68 65 20 69 6e 63 | to make| the inc|
|00001350| 6c 75 73 69 6f 6e 20 6f | 66 20 73 75 62 73 74 61 |lusion o|f substa|
|00001360| 6e 74 69 61 6c 20 6e 65 | 77 20 0a 66 75 6e 63 74 |ntial ne|w .funct|
|00001370| 69 6f 6e 20 65 78 74 72 | 65 6d 65 6c 79 20 64 69 |ion extr|emely di|
|00001380| 66 66 69 63 75 6c 74 2e | 20 20 0a 41 6e 6f 74 68 |fficult.| .Anoth|
|00001390| 65 72 20 70 72 6f 62 6c | 65 6d 20 77 69 74 68 20 |er probl|em with |
|000013a0| 63 6f 6e 74 69 6e 75 69 | 6e 67 20 74 6f 20 65 78 |continui|ng to ex|
|000013b0| 74 65 6e 64 20 74 68 65 | 20 65 78 69 73 74 69 6e |tend the| existin|
|000013c0| 67 20 73 79 73 74 65 6d | 0a 69 73 20 74 68 61 74 |g system|.is that|
|000013d0| 20 6d 61 6e 79 20 6f 66 | 20 6f 75 72 20 70 72 6f | many of| our pro|
|000013e0| 70 6f 73 65 64 20 69 64 | 65 61 73 20 77 6f 75 6c |posed id|eas woul|
|000013f0| 64 20 62 65 20 64 69 66 | 66 69 63 75 6c 74 20 74 |d be dif|ficult t|
|00001400| 6f 20 0a 69 6e 74 65 67 | 72 61 74 65 20 69 6e 74 |o .integ|rate int|
|00001410| 6f 20 74 68 61 74 20 73 | 79 73 74 65 6d 20 62 65 |o that s|ystem be|
|00001420| 63 61 75 73 65 20 6f 66 | 20 65 61 72 6c 69 65 72 |cause of| earlier|
|00001430| 20 64 65 73 69 67 6e 20 | 64 65 63 69 73 69 6f 6e | design |decision|
|00001440| 73 2e 0a 43 6f 6e 73 65 | 71 75 65 6e 74 6c 79 2c |s..Conse|quently,|
|00001450| 20 77 65 20 61 72 65 20 | 62 75 69 6c 64 69 6e 67 | we are |building|
|00001460| 20 61 20 6e 65 77 20 64 | 61 74 61 62 61 73 65 20 | a new d|atabase |
|00001470| 73 79 73 74 65 6d 2c 20 | 63 61 6c 6c 65 64 20 50 |system, |called P|
|00001480| 4f 53 54 47 52 45 53 20 | 28 50 4f 53 54 0a 69 6e |OSTGRES |(POST.in|
|00001490| 47 52 45 53 29 2e 20 20 | 0a 2e 70 70 0a 54 68 69 |GRES). |..pp.Thi|
|000014a0| 73 20 70 61 70 65 72 20 | 64 65 73 63 72 69 62 65 |s paper |describe|
|000014b0| 73 20 74 68 65 20 64 65 | 73 69 67 6e 20 72 61 74 |s the de|sign rat|
|000014c0| 69 6f 6e 61 6c 65 2c 20 | 0a 74 68 65 20 66 65 61 |ionale, |.the fea|
|000014d0| 74 75 72 65 73 20 6f 66 | 20 50 4f 53 54 47 52 45 |tures of| POSTGRE|
|000014e0| 53 2c 20 61 6e 64 20 6f | 75 72 20 70 72 6f 70 6f |S, and o|ur propo|
|000014f0| 73 65 64 20 69 6d 70 6c | 65 6d 65 6e 74 61 74 69 |sed impl|ementati|
|00001500| 6f 6e 20 66 6f 72 20 74 | 68 65 20 73 79 73 74 65 |on for t|he syste|
|00001510| 6d 2e 0a 54 68 65 20 6e | 65 78 74 20 73 65 63 74 |m..The n|ext sect|
|00001520| 69 6f 6e 20 64 69 73 63 | 75 73 73 65 73 20 74 68 |ion disc|usses th|
|00001530| 65 20 64 65 73 69 67 6e | 20 67 6f 61 6c 73 20 66 |e design| goals f|
|00001540| 6f 72 20 74 68 65 20 73 | 79 73 74 65 6d 2e 0a 53 |or the s|ystem..S|
|00001550| 65 63 74 69 6f 6e 73 20 | 33 20 61 6e 64 20 34 20 |ections |3 and 4 |
|00001560| 70 72 65 73 65 6e 74 73 | 20 74 68 65 20 71 75 65 |presents| the que|
|00001570| 72 79 20 6c 61 6e 67 75 | 61 67 65 20 61 6e 64 20 |ry langu|age and |
|00001580| 70 72 6f 67 72 61 6d 6d | 69 6e 67 0a 6c 61 6e 67 |programm|ing.lang|
|00001590| 75 61 67 65 20 69 6e 74 | 65 72 66 61 63 65 2c 20 |uage int|erface, |
|000015a0| 72 65 73 70 65 63 74 69 | 76 65 6c 79 2c 20 74 6f |respecti|vely, to|
|000015b0| 20 74 68 65 20 73 79 73 | 74 65 6d 2e 0a 53 65 63 | the sys|tem..Sec|
|000015c0| 74 69 6f 6e 20 35 20 64 | 65 73 63 72 69 62 65 73 |tion 5 d|escribes|
|000015d0| 20 74 68 65 20 73 79 73 | 74 65 6d 20 61 72 63 68 | the sys|tem arch|
|000015e0| 69 74 65 63 74 75 72 65 | 20 69 6e 63 6c 75 64 69 |itecture| includi|
|000015f0| 6e 67 0a 74 68 65 20 70 | 72 6f 63 65 73 73 20 73 |ng.the p|rocess s|
|00001600| 74 72 75 63 74 75 72 65 | 2c 20 71 75 65 72 79 20 |tructure|, query |
|00001610| 70 72 6f 63 65 73 73 69 | 6e 67 20 73 74 72 61 74 |processi|ng strat|
|00001620| 65 67 69 65 73 2c 20 61 | 6e 64 20 73 74 6f 72 61 |egies, a|nd stora|
|00001630| 67 65 0a 73 79 73 74 65 | 6d 2e 0a 2e 73 68 20 31 |ge.syste|m...sh 1|
|00001640| 20 20 22 44 49 53 43 55 | 53 53 49 4f 4e 20 4f 46 | "DISCU|SSION OF|
|00001650| 20 44 45 53 49 47 4e 20 | 47 4f 41 4c 53 22 0a 2e | DESIGN |GOALS"..|
|00001660| 70 70 0a 54 68 65 20 72 | 65 6c 61 74 69 6f 6e 61 |pp.The r|elationa|
|00001670| 6c 20 64 61 74 61 20 6d | 6f 64 65 6c 20 68 61 73 |l data m|odel has|
|00001680| 20 70 72 6f 76 65 6e 20 | 76 65 72 79 20 73 75 63 | proven |very suc|
|00001690| 63 65 73 73 66 75 6c 20 | 61 74 0a 73 6f 6c 76 69 |cessful |at.solvi|
|000016a0| 6e 67 20 6d 6f 73 74 20 | 62 75 73 69 6e 65 73 73 |ng most |business|
|000016b0| 20 64 61 74 61 20 70 72 | 6f 63 65 73 73 69 6e 67 | data pr|ocessing|
|000016c0| 20 70 72 6f 62 6c 65 6d | 73 2e 20 0a 4d 61 6e 79 | problem|s. .Many|
|000016d0| 20 63 6f 6d 6d 65 72 63 | 69 61 6c 20 73 79 73 74 | commerc|ial syst|
|000016e0| 65 6d 73 20 61 72 65 20 | 62 65 69 6e 67 20 6d 61 |ems are |being ma|
|000016f0| 72 6b 65 74 65 64 20 74 | 68 61 74 20 61 72 65 0a |rketed t|hat are.|
|00001700| 62 61 73 65 64 20 6f 6e | 20 74 68 65 20 72 65 6c |based on| the rel|
|00001710| 61 74 69 6f 6e 61 6c 20 | 6d 6f 64 65 6c 20 61 6e |ational |model an|
|00001720| 64 20 69 6e 20 74 69 6d | 65 20 74 68 65 73 65 20 |d in tim|e these |
|00001730| 73 79 73 74 65 6d 73 0a | 77 69 6c 6c 20 72 65 70 |systems.|will rep|
|00001740| 6c 61 63 65 20 6f 6c 64 | 65 72 20 74 65 63 68 6e |lace old|er techn|
|00001750| 6f 6c 6f 67 79 20 44 42 | 4d 53 27 73 2e 0a 48 6f |ology DB|MS's..Ho|
|00001760| 77 65 76 65 72 2c 20 74 | 68 65 72 65 20 61 72 65 |wever, t|here are|
|00001770| 20 6d 61 6e 79 20 65 6e | 67 69 6e 65 65 72 69 6e | many en|gineerin|
|00001780| 67 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 73 20 28 |g applic|ations (|
|00001790| 65 2e 67 2e 2c 20 43 41 | 44 20 73 79 73 74 65 6d |e.g., CA|D system|
|000017a0| 73 2c 20 70 72 6f 67 72 | 61 6d 6d 69 6e 67 20 65 |s, progr|amming e|
|000017b0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 73 2c 0a 67 65 6f |nvironme|nts,.geo|
|000017c0| 67 72 61 70 68 69 63 20 | 64 61 74 61 2c 20 61 6e |graphic |data, an|
|000017d0| 64 20 67 72 61 70 68 69 | 63 73 29 20 66 6f 72 20 |d graphi|cs) for |
|000017e0| 77 68 69 63 68 20 61 20 | 63 6f 6e 76 65 6e 74 69 |which a |conventi|
|000017f0| 6f 6e 61 6c 20 72 65 6c | 61 74 69 6f 6e 61 6c 20 |onal rel|ational |
|00001800| 73 79 73 74 65 6d 0a 69 | 73 20 6e 6f 74 20 73 75 |system.i|s not su|
|00001810| 69 74 61 62 6c 65 2e 0a | 57 65 20 68 61 76 65 20 |itable..|We have |
|00001820| 65 6d 62 61 72 6b 65 64 | 20 6f 6e 20 74 68 65 20 |embarked| on the |
|00001830| 64 65 73 69 67 6e 20 61 | 6e 64 20 69 6d 70 6c 65 |design a|nd imple|
|00001840| 6d 65 6e 74 61 74 69 6f | 6e 20 6f 66 20 61 20 6e |mentatio|n of a n|
|00001850| 65 77 0a 67 65 6e 65 72 | 61 74 69 6f 6e 20 6f 66 |ew.gener|ation of|
|00001860| 20 44 42 4d 53 27 73 2c | 20 62 61 73 65 64 20 6f | DBMS's,| based o|
|00001870| 6e 20 74 68 65 20 72 65 | 6c 61 74 69 6f 6e 61 6c |n the re|lational|
|00001880| 20 6d 6f 64 65 6c 2c 20 | 74 68 61 74 20 77 69 6c | model, |that wil|
|00001890| 6c 0a 70 72 6f 76 69 64 | 65 20 74 68 65 20 66 61 |l.provid|e the fa|
|000018a0| 63 69 6c 69 74 69 65 73 | 20 72 65 71 75 69 72 65 |cilities| require|
|000018b0| 64 20 62 79 20 20 74 68 | 65 73 65 20 61 70 70 6c |d by th|ese appl|
|000018c0| 69 63 61 74 69 6f 6e 73 | 2e 0a 54 68 69 73 20 73 |ications|..This s|
|000018d0| 65 63 74 69 6f 6e 20 64 | 65 73 63 72 69 62 65 73 |ection d|escribes|
|000018e0| 20 74 68 65 20 6d 61 6a | 6f 72 20 64 65 73 69 67 | the maj|or desig|
|000018f0| 6e 20 67 6f 61 6c 73 20 | 66 6f 72 20 74 68 69 73 |n goals |for this|
|00001900| 20 6e 65 77 20 73 79 73 | 74 65 6d 2e 0a 2e 70 70 | new sys|tem...pp|
|00001910| 0a 54 68 65 20 66 69 72 | 73 74 20 67 6f 61 6c 20 |.The fir|st goal |
|00001920| 69 73 20 74 6f 20 73 75 | 70 70 6f 72 74 20 63 6f |is to su|pport co|
|00001930| 6d 70 6c 65 78 20 6f 62 | 6a 65 63 74 73 20 5b 4c |mplex ob|jects [L|
|00001940| 4f 52 49 38 33 2c 20 53 | 54 4f 4e 38 33 63 5d 2e |ORI83, S|TON83c].|
|00001950| 0a 45 6e 67 69 6e 65 65 | 72 69 6e 67 20 64 61 74 |.Enginee|ring dat|
|00001960| 61 2c 20 69 6e 20 63 6f | 6e 74 72 61 73 74 20 74 |a, in co|ntrast t|
|00001970| 6f 20 62 75 73 69 6e 65 | 73 73 20 64 61 74 61 2c |o busine|ss data,|
|00001980| 20 0a 69 73 20 6d 6f 72 | 65 20 63 6f 6d 70 6c 65 | .is mor|e comple|
|00001990| 78 20 61 6e 64 20 64 79 | 6e 61 6d 69 63 2e 0a 41 |x and dy|namic..A|
|000019a0| 6c 74 68 6f 75 67 68 20 | 74 68 65 20 72 65 71 75 |lthough |the requ|
|000019b0| 69 72 65 64 20 64 61 74 | 61 20 74 79 70 65 73 20 |ired dat|a types |
|000019c0| 63 61 6e 20 62 65 20 73 | 69 6d 75 6c 61 74 65 64 |can be s|imulated|
|000019d0| 20 6f 6e 20 61 20 72 65 | 6c 61 74 69 6f 6e 61 6c | on a re|lational|
|000019e0| 20 73 79 73 74 65 6d 2c | 20 74 68 65 0a 70 65 72 | system,| the.per|
|000019f0| 66 6f 72 6d 61 6e 63 65 | 20 6f 66 20 74 68 65 20 |formance| of the |
|00001a00| 61 70 70 6c 69 63 61 74 | 69 6f 6e 73 20 69 73 20 |applicat|ions is |
|00001a10| 75 6e 61 63 63 65 70 74 | 61 62 6c 65 2e 0a 43 6f |unaccept|able..Co|
|00001a20| 6e 73 69 64 65 72 20 74 | 68 65 20 66 6f 6c 6c 6f |nsider t|he follo|
|00001a30| 77 69 6e 67 20 73 69 6d | 70 6c 65 20 65 78 61 6d |wing sim|ple exam|
|00001a40| 70 6c 65 2e 0a 54 68 65 | 20 6f 62 6a 65 63 74 69 |ple..The| objecti|
|00001a50| 76 65 20 69 73 20 74 6f | 20 73 74 6f 72 65 20 61 |ve is to| store a|
|00001a60| 20 63 6f 6c 6c 65 63 74 | 69 6f 6e 20 6f 66 20 67 | collect|ion of g|
|00001a70| 65 6f 67 72 61 70 68 69 | 63 20 6f 62 6a 65 63 74 |eographi|c object|
|00001a80| 73 20 69 6e 20 61 0a 64 | 61 74 61 62 61 73 65 20 |s in a.d|atabase |
|00001a90| 28 65 2e 67 2e 2c 20 70 | 6f 6c 79 67 6f 6e 73 2c |(e.g., p|olygons,|
|00001aa0| 20 6c 69 6e 65 73 2c 20 | 61 6e 64 20 63 69 72 63 | lines, |and circ|
|00001ab0| 6c 65 73 29 2e 20 20 49 | 6e 20 61 20 63 6f 6e 76 |les). I|n a conv|
|00001ac0| 65 6e 74 69 6f 6e 61 6c | 0a 72 65 6c 61 74 69 6f |entional|.relatio|
|00001ad0| 6e 61 6c 20 44 42 4d 53 | 2c 20 61 20 72 65 6c 61 |nal DBMS|, a rela|
|00001ae0| 74 69 6f 6e 20 66 6f 72 | 20 65 61 63 68 20 74 79 |tion for| each ty|
|00001af0| 70 65 20 6f 66 20 6f 62 | 6a 65 63 74 0a 77 69 74 |pe of ob|ject.wit|
|00001b00| 68 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 66 69 |h approp|riate fi|
|00001b10| 65 6c 64 73 20 77 6f 75 | 6c 64 20 62 65 20 63 72 |elds wou|ld be cr|
|00001b20| 65 61 74 65 64 3a 0a 2e | 28 62 0a 50 4f 4c 59 47 |eated:..|(b.POLYG|
|00001b30| 4f 4e 20 28 69 64 2c 20 | 6f 74 68 65 72 20 66 69 |ON (id, |other fi|
|00001b40| 65 6c 64 73 29 0a 43 49 | 52 43 4c 45 20 28 69 64 |elds).CI|RCLE (id|
|00001b50| 2c 20 6f 74 68 65 72 20 | 66 69 65 6c 64 73 29 0a |, other |fields).|
|00001b60| 4c 49 4e 45 20 28 69 64 | 2c 20 6f 74 68 65 72 20 |LINE (id|, other |
|00001b70| 66 69 65 6c 64 73 29 0a | 2e 29 62 0a 54 6f 20 64 |fields).|.)b.To d|
|00001b80| 69 73 70 6c 61 79 20 74 | 68 65 73 65 20 6f 62 6a |isplay t|hese obj|
|00001b90| 65 63 74 73 20 6f 6e 20 | 74 68 65 0a 73 63 72 65 |ects on |the.scre|
|00001ba0| 65 6e 20 77 6f 75 6c 64 | 20 72 65 71 75 69 72 65 |en would| require|
|00001bb0| 20 61 64 64 69 74 69 6f | 6e 61 6c 20 69 6e 66 6f | additio|nal info|
|00001bc0| 72 6d 61 74 69 6f 6e 20 | 74 68 61 74 20 72 65 70 |rmation |that rep|
|00001bd0| 72 65 73 65 6e 74 65 64 | 0a 64 69 73 70 6c 61 79 |resented|.display|
|00001be0| 20 63 68 61 72 61 63 74 | 65 72 69 73 74 69 63 73 | charact|eristics|
|00001bf0| 20 66 6f 72 20 65 61 63 | 68 20 6f 62 6a 65 63 74 | for eac|h object|
|00001c00| 20 28 65 2e 67 2e 2c 20 | 63 6f 6c 6f 72 2c 20 70 | (e.g., |color, p|
|00001c10| 6f 73 69 74 69 6f 6e 2c | 0a 73 63 61 6c 69 6e 67 |osition,|.scaling|
|00001c20| 20 66 61 63 74 6f 72 2c | 20 65 74 63 2e 29 2e 20 | factor,| etc.). |
|00001c30| 20 0a 42 65 63 61 75 73 | 65 20 74 68 69 73 20 69 | .Becaus|e this i|
|00001c40| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 69 73 20 74 68 |nformati|on is th|
|00001c50| 65 20 73 61 6d 65 20 66 | 6f 72 20 61 6c 6c 20 6f |e same f|or all o|
|00001c60| 62 6a 65 63 74 73 2c 20 | 69 74 0a 63 61 6e 20 62 |bjects, |it.can b|
|00001c70| 65 20 73 74 6f 72 65 64 | 20 69 6e 20 61 20 73 69 |e stored| in a si|
|00001c80| 6e 67 6c 65 20 72 65 6c | 61 74 69 6f 6e 3a 0a 2e |ngle rel|ation:..|
|00001c90| 28 62 0a 44 49 53 50 4c | 41 59 28 20 63 6f 6c 6f |(b.DISPL|AY( colo|
|00001ca0| 72 2c 20 70 6f 73 69 74 | 69 6f 6e 2c 20 73 63 61 |r, posit|ion, sca|
|00001cb0| 6c 69 6e 67 2c 20 6f 62 | 6a 2d 74 79 70 65 2c 20 |ling, ob|j-type, |
|00001cc0| 6f 62 6a 65 63 74 2d 69 | 64 29 0a 2e 29 62 0a 54 |object-i|d)..)b.T|
|00001cd0| 68 65 20 60 60 6f 62 6a | 65 63 74 2d 69 64 27 27 |he ``obj|ect-id''|
|00001ce0| 20 66 69 65 6c 64 20 69 | 73 20 74 68 65 20 69 64 | field i|s the id|
|00001cf0| 65 6e 74 69 66 69 65 72 | 20 6f 66 20 61 20 74 75 |entifier| of a tu|
|00001d00| 70 6c 65 20 69 6e 0a 61 | 20 72 65 6c 61 74 69 6f |ple in.a| relatio|
|00001d10| 6e 20 69 64 65 6e 74 69 | 66 69 65 64 20 62 79 20 |n identi|fied by |
|00001d20| 74 68 65 20 60 60 6f 62 | 6a 2d 74 79 70 65 27 27 |the ``ob|j-type''|
|00001d30| 20 66 69 65 6c 64 20 28 | 69 2e 65 2e 2c 20 50 4f | field (|i.e., PO|
|00001d40| 4c 59 47 4f 4e 2c 0a 43 | 49 52 43 4c 45 2c 20 6f |LYGON,.C|IRCLE, o|
|00001d50| 72 20 4c 49 4e 45 29 2e | 0a 47 69 76 65 6e 20 74 |r LINE).|.Given t|
|00001d60| 68 69 73 20 72 65 70 72 | 65 73 65 6e 74 61 74 69 |his repr|esentati|
|00001d70| 6f 6e 2c 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |on, the |followin|
|00001d80| 67 20 63 6f 6d 6d 61 6e | 64 73 20 77 6f 75 6c 64 |g comman|ds would|
|00001d90| 20 68 61 76 65 20 74 6f | 20 62 65 20 65 78 65 63 | have to| be exec|
|00001da0| 75 74 65 64 0a 74 6f 20 | 70 72 6f 64 75 63 65 20 |uted.to |produce |
|00001db0| 61 20 64 69 73 70 6c 61 | 79 3a 0a 2e 28 62 0a 66 |a displa|y:..(b.f|
|00001dc0| 6f 72 65 61 63 68 20 4f | 42 4a 20 69 6e 20 7b 50 |oreach O|BJ in {P|
|00001dd0| 4f 4c 59 47 4f 4e 2c 20 | 43 49 52 43 4c 45 2c 20 |OLYGON, |CIRCLE, |
|00001de0| 4c 49 4e 45 7d 20 64 6f | 0a 20 20 20 20 72 61 6e |LINE} do|. ran|
|00001df0| 67 65 20 6f 66 20 4f 20 | 69 73 20 4f 42 4a 0a 20 |ge of O |is OBJ. |
|00001e00| 20 20 20 72 61 6e 67 65 | 20 6f 66 20 44 20 69 73 | range| of D is|
|00001e10| 20 44 49 53 50 4c 41 59 | 0a 20 20 20 20 72 65 74 | DISPLAY|. ret|
|00001e20| 72 69 65 76 65 20 28 44 | 2e 61 6c 6c 2c 20 4f 2e |rieve (D|.all, O.|
|00001e30| 61 6c 6c 29 0a 20 20 20 | 20 77 68 65 72 65 20 44 |all). | where D|
|00001e40| 2e 6f 62 6a 65 63 74 2d | 69 64 20 3d 20 4f 2e 69 |.object-|id = O.i|
|00001e50| 64 0a 20 20 20 20 61 6e | 64 20 44 2e 6f 62 6a 2d |d. an|d D.obj-|
|00001e60| 74 79 70 65 20 3d 20 4f | 42 4a 0a 2e 29 62 0a 55 |type = O|BJ..)b.U|
|00001e70| 6e 66 6f 72 74 75 6e 61 | 74 65 6c 79 2c 20 74 68 |nfortuna|tely, th|
|00001e80| 69 73 20 63 6f 6c 6c 65 | 63 74 69 6f 6e 20 6f 66 |is colle|ction of|
|00001e90| 20 63 6f 6d 6d 61 6e 64 | 73 20 77 69 6c 6c 20 6e | command|s will n|
|00001ea0| 6f 74 20 62 65 20 65 78 | 65 63 75 74 65 64 0a 66 |ot be ex|ecuted.f|
|00001eb0| 61 73 74 20 65 6e 6f 75 | 67 68 20 62 79 20 61 6e |ast enou|gh by an|
|00001ec0| 79 20 72 65 6c 61 74 69 | 6f 6e 61 6c 20 73 79 73 |y relati|onal sys|
|00001ed0| 74 65 6d 20 74 6f 20 60 | 60 70 61 69 6e 74 20 74 |tem to `|`paint t|
|00001ee0| 68 65 20 73 63 72 65 65 | 6e 27 27 20 69 6e 20 0a |he scree|n'' in .|
|00001ef0| 72 65 61 6c 20 74 69 6d | 65 20 28 69 2e 65 2e 2c |real tim|e (i.e.,|
|00001f00| 20 6f 6e 65 20 6f 72 20 | 74 77 6f 20 73 65 63 6f | one or |two seco|
|00001f10| 6e 64 73 29 2e 0a 54 68 | 65 20 70 72 6f 62 6c 65 |nds)..Th|e proble|
|00001f20| 6d 20 69 73 20 74 68 61 | 74 20 72 65 67 61 72 64 |m is tha|t regard|
|00001f30| 6c 65 73 73 20 6f 66 20 | 68 6f 77 20 66 61 73 74 |less of |how fast|
|00001f40| 20 79 6f 75 72 20 44 42 | 4d 53 20 69 73 20 74 68 | your DB|MS is th|
|00001f50| 65 72 65 20 61 72 65 0a | 74 6f 6f 20 6d 61 6e 79 |ere are.|too many|
|00001f60| 20 71 75 65 72 69 65 73 | 20 74 68 61 74 20 68 61 | queries| that ha|
|00001f70| 76 65 20 74 6f 20 62 65 | 20 65 78 65 63 75 74 65 |ve to be| execute|
|00001f80| 64 20 74 6f 20 66 65 74 | 63 68 20 74 68 65 20 64 |d to fet|ch the d|
|00001f90| 61 74 61 20 66 6f 72 20 | 74 68 65 20 6f 62 6a 65 |ata for |the obje|
|00001fa0| 63 74 2e 0a 54 68 65 20 | 66 65 61 74 75 72 65 20 |ct..The |feature |
|00001fb0| 74 68 61 74 20 69 73 20 | 6e 65 65 64 65 64 20 69 |that is |needed i|
|00001fc0| 73 20 74 68 65 20 61 62 | 69 6c 69 74 79 20 74 6f |s the ab|ility to|
|00001fd0| 20 73 74 6f 72 65 20 74 | 68 65 20 6f 62 6a 65 63 | store t|he objec|
|00001fe0| 74 20 0a 69 6e 20 61 20 | 66 69 65 6c 64 20 69 6e |t .in a |field in|
|00001ff0| 20 44 49 53 50 4c 41 59 | 20 73 6f 20 74 68 61 74 | DISPLAY| so that|
|00002000| 20 6f 6e 6c 79 20 6f 6e | 65 20 71 75 65 72 79 20 | only on|e query |
|00002010| 69 73 20 72 65 71 75 69 | 72 65 64 20 74 6f 20 66 |is requi|red to f|
|00002020| 65 74 63 68 20 69 74 2e | 0a 43 6f 6e 73 65 71 75 |etch it.|.Consequ|
|00002030| 65 6e 74 6c 79 2c 20 6f | 75 72 20 66 69 72 73 74 |ently, o|ur first|
|00002040| 20 67 6f 61 6c 20 69 73 | 20 74 6f 20 63 6f 72 72 | goal is| to corr|
|00002050| 65 63 74 20 74 68 69 73 | 20 64 65 66 69 63 69 65 |ect this| deficie|
|00002060| 6e 63 79 2e 0a 2e 70 70 | 0a 54 68 65 20 73 65 63 |ncy...pp|.The sec|
|00002070| 6f 6e 64 20 67 6f 61 6c | 20 66 6f 72 20 50 4f 53 |ond goal| for POS|
|00002080| 54 47 52 45 53 20 69 73 | 20 74 6f 20 6d 61 6b 65 |TGRES is| to make|
|00002090| 20 69 74 20 65 61 73 69 | 65 72 20 74 6f 20 65 78 | it easi|er to ex|
|000020a0| 74 65 6e 64 20 74 68 65 | 0a 44 42 4d 53 20 73 6f |tend the|.DBMS so|
|000020b0| 20 74 68 61 74 20 69 74 | 20 63 61 6e 20 62 65 20 | that it| can be |
|000020c0| 75 73 65 64 20 69 6e 20 | 6e 65 77 20 61 70 70 6c |used in |new appl|
|000020d0| 69 63 61 74 69 6f 6e 20 | 64 6f 6d 61 69 6e 73 2e |ication |domains.|
|000020e0| 0a 41 20 63 6f 6e 76 65 | 6e 74 69 6f 6e 61 6c 20 |.A conve|ntional |
|000020f0| 44 42 4d 53 20 68 61 73 | 20 61 20 73 6d 61 6c 6c |DBMS has| a small|
|00002100| 20 73 65 74 20 6f 66 20 | 62 75 69 6c 74 2d 69 6e | set of |built-in|
|00002110| 20 64 61 74 61 20 74 79 | 70 65 73 20 61 6e 64 0a | data ty|pes and.|
|00002120| 61 63 63 65 73 73 20 6d | 65 74 68 6f 64 73 2e 0a |access m|ethods..|
|00002130| 4d 61 6e 79 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |Many app|lication|
|00002140| 73 20 72 65 71 75 69 72 | 65 20 73 70 65 63 69 61 |s requir|e specia|
|00002150| 6c 69 7a 65 64 20 64 61 | 74 61 20 74 79 70 65 73 |lized da|ta types|
|00002160| 20 28 65 2e 67 2e 2c 20 | 67 65 6f 6d 65 74 69 63 | (e.g., |geometic|
|00002170| 0a 64 61 74 61 20 74 79 | 70 65 73 20 66 6f 72 20 |.data ty|pes for |
|00002180| 43 41 44 2f 43 41 4d 20 | 6f 72 20 61 20 6c 61 74 |CAD/CAM |or a lat|
|00002190| 69 74 75 64 65 20 61 6e | 64 20 6c 6f 6e 67 69 74 |itude an|d longit|
|000021a0| 75 64 65 20 70 6f 73 69 | 74 69 6f 6e 20 64 61 74 |ude posi|tion dat|
|000021b0| 61 0a 74 79 70 65 20 66 | 6f 72 20 6d 61 70 70 69 |a.type f|or mappi|
|000021c0| 6e 67 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 29 |ng appli|cations)|
|000021d0| 2e 0a 57 68 69 6c 65 20 | 74 68 65 73 65 20 64 61 |..While |these da|
|000021e0| 74 61 20 74 79 70 65 73 | 20 63 61 6e 20 62 65 20 |ta types| can be |
|000021f0| 73 69 6d 75 6c 61 74 65 | 64 20 6f 6e 20 74 68 65 |simulate|d on the|
|00002200| 20 62 75 69 6c 74 2d 69 | 6e 20 64 61 74 61 20 74 | built-i|n data t|
|00002210| 79 70 65 73 2c 0a 74 68 | 65 20 72 65 73 75 6c 74 |ypes,.th|e result|
|00002220| 69 6e 67 20 71 75 65 72 | 69 65 73 20 61 72 65 20 |ing quer|ies are |
|00002230| 76 65 72 62 6f 73 65 20 | 61 6e 64 20 63 6f 6e 66 |verbose |and conf|
|00002240| 75 73 69 6e 67 20 61 6e | 64 20 74 68 65 20 70 65 |using an|d the pe|
|00002250| 72 66 6f 72 6d 61 6e 63 | 65 0a 63 61 6e 20 62 65 |rformanc|e.can be|
|00002260| 20 70 6f 6f 72 2e 0a 41 | 20 73 69 6d 70 6c 65 20 | poor..A| simple |
|00002270| 65 78 61 6d 70 6c 65 20 | 75 73 69 6e 67 20 62 6f |example |using bo|
|00002280| 78 65 73 20 69 73 20 70 | 72 65 73 65 6e 74 65 64 |xes is p|resented|
|00002290| 20 65 6c 73 65 77 68 65 | 72 65 20 5b 53 54 4f 4e | elsewhe|re [STON|
|000022a0| 38 36 5d 2e 0a 53 75 63 | 68 20 61 70 70 6c 69 63 |86]..Suc|h applic|
|000022b0| 61 74 69 6f 6e 73 20 77 | 6f 75 6c 64 20 62 65 20 |ations w|ould be |
|000022c0| 62 65 73 74 20 73 65 72 | 76 65 64 20 62 79 20 74 |best ser|ved by t|
|000022d0| 68 65 20 61 62 69 6c 69 | 74 79 20 74 6f 0a 61 64 |he abili|ty to.ad|
|000022e0| 64 20 6e 65 77 20 64 61 | 74 61 20 74 79 70 65 73 |d new da|ta types|
|000022f0| 20 61 6e 64 20 6e 65 77 | 20 6f 70 65 72 61 74 6f | and new| operato|
|00002300| 72 73 20 74 6f 20 61 20 | 44 42 4d 53 2e 20 20 0a |rs to a |DBMS. .|
|00002310| 4d 6f 72 65 6f 76 65 72 | 2c 20 42 2d 74 72 65 65 |Moreover|, B-tree|
|00002320| 73 20 61 72 65 20 6f 6e | 6c 79 20 61 70 70 72 6f |s are on|ly appro|
|00002330| 70 72 69 61 74 65 20 66 | 6f 72 20 63 65 72 74 61 |priate f|or certa|
|00002340| 69 6e 20 6b 69 6e 64 73 | 20 6f 66 20 64 61 74 61 |in kinds| of data|
|00002350| 2c 20 0a 61 6e 64 20 6e | 65 77 20 61 63 63 65 73 |, .and n|ew acces|
|00002360| 73 20 6d 65 74 68 6f 64 | 73 20 61 72 65 20 6f 66 |s method|s are of|
|00002370| 74 65 6e 20 72 65 71 75 | 69 72 65 64 20 66 6f 72 |ten requ|ired for|
|00002380| 20 73 6f 6d 65 20 64 61 | 74 61 20 74 79 70 65 73 | some da|ta types|
|00002390| 2e 20 20 0a 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |. .For |example,|
|000023a0| 20 4b 2d 44 2d 42 20 74 | 72 65 65 73 20 5b 52 4f | K-D-B t|rees [RO|
|000023b0| 42 49 38 31 5d 20 61 6e | 64 20 52 2d 74 72 65 65 |BI81] an|d R-tree|
|000023c0| 73 20 5b 47 55 54 4d 38 | 34 5d 20 0a 61 72 65 20 |s [GUTM8|4] .are |
|000023d0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 61 63 63 65 |appropri|ate acce|
|000023e0| 73 73 20 6d 65 74 68 6f | 64 73 20 66 6f 72 20 70 |ss metho|ds for p|
|000023f0| 6f 69 6e 74 20 61 6e 64 | 20 70 6f 6c 79 67 6f 6e |oint and| polygon|
|00002400| 20 64 61 74 61 2c 20 0a | 72 65 73 70 65 63 74 69 | data, .|respecti|
|00002410| 76 65 6c 79 2e 20 20 0a | 2e 70 70 0a 43 6f 6e 73 |vely. .|.pp.Cons|
|00002420| 65 71 75 65 6e 74 6c 79 | 2c 20 6f 75 72 20 73 65 |equently|, our se|
|00002430| 63 6f 6e 64 20 67 6f 61 | 6c 20 69 73 20 74 6f 20 |cond goa|l is to |
|00002440| 61 6c 6c 6f 77 20 6e 65 | 77 20 64 61 74 61 20 74 |allow ne|w data t|
|00002450| 79 70 65 73 2c 20 6e 65 | 77 20 6f 70 65 72 61 74 |ypes, ne|w operat|
|00002460| 6f 72 73 20 61 6e 64 0a | 6e 65 77 20 61 63 63 65 |ors and.|new acce|
|00002470| 73 73 20 6d 65 74 68 6f | 64 73 20 74 6f 20 62 65 |ss metho|ds to be|
|00002480| 20 69 6e 63 6c 75 64 65 | 64 20 69 6e 20 74 68 65 | include|d in the|
|00002490| 20 44 42 4d 53 2e 20 20 | 4d 6f 72 65 6f 76 65 72 | DBMS. |Moreover|
|000024a0| 2c 20 69 74 20 69 73 20 | 63 72 75 63 69 61 6c 20 |, it is |crucial |
|000024b0| 0a 74 68 61 74 20 74 68 | 65 79 20 62 65 20 69 6d |.that th|ey be im|
|000024c0| 70 6c 65 6d 65 6e 74 61 | 62 6c 65 20 62 79 20 6e |plementa|ble by n|
|000024d0| 6f 6e 2d 65 78 70 65 72 | 74 73 20 77 68 69 63 68 |on-exper|ts which|
|000024e0| 20 6d 65 61 6e 73 20 65 | 61 73 79 2d 74 6f 2d 75 | means e|asy-to-u|
|000024f0| 73 65 20 0a 69 6e 74 65 | 72 66 61 63 65 73 20 73 |se .inte|rfaces s|
|00002500| 68 6f 75 6c 64 20 62 65 | 20 70 72 65 73 65 72 76 |hould be| preserv|
|00002510| 65 64 20 66 6f 72 20 61 | 6e 79 20 63 6f 64 65 20 |ed for a|ny code |
|00002520| 74 68 61 74 20 77 69 6c | 6c 20 62 65 20 77 72 69 |that wil|l be wri|
|00002530| 74 74 65 6e 20 62 79 20 | 61 20 75 73 65 72 2e 0a |tten by |a user..|
|00002540| 4f 74 68 65 72 20 72 65 | 73 65 61 72 63 68 65 72 |Other re|searcher|
|00002550| 73 20 61 72 65 20 70 75 | 72 73 75 69 6e 67 20 61 |s are pu|rsuing a|
|00002560| 20 73 69 6d 69 6c 61 72 | 20 67 6f 61 6c 20 5b 44 | similar| goal [D|
|00002570| 45 57 49 38 35 5d 2e 0a | 2e 70 70 0a 54 68 65 20 |EWI85]..|.pp.The |
|00002580| 74 68 69 72 64 20 67 6f | 61 6c 20 66 6f 72 20 50 |third go|al for P|
|00002590| 4f 53 54 47 52 45 53 20 | 69 73 20 74 6f 20 73 75 |OSTGRES |is to su|
|000025a0| 70 70 6f 72 74 20 61 63 | 74 69 76 65 20 64 61 74 |pport ac|tive dat|
|000025b0| 61 62 61 73 65 73 20 61 | 6e 64 20 72 75 6c 65 73 |abases a|nd rules|
|000025c0| 2e 0a 4d 61 6e 79 20 61 | 70 70 6c 69 63 61 74 69 |..Many a|pplicati|
|000025d0| 6f 6e 73 20 61 72 65 20 | 6d 6f 73 74 20 65 61 73 |ons are |most eas|
|000025e0| 69 6c 79 20 70 72 6f 67 | 72 61 6d 6d 65 64 20 75 |ily prog|rammed u|
|000025f0| 73 69 6e 67 20 61 6c 65 | 72 74 65 72 73 20 61 6e |sing ale|rters an|
|00002600| 64 20 74 72 69 67 67 65 | 72 73 2e 20 20 20 0a 46 |d trigge|rs. .F|
|00002610| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 66 6f 72 6d |or examp|le, form|
|00002620| 2d 66 6c 6f 77 20 61 70 | 70 6c 69 63 61 74 69 6f |-flow ap|plicatio|
|00002630| 6e 73 20 73 75 63 68 20 | 61 73 20 61 20 62 75 67 |ns such |as a bug|
|00002640| 20 72 65 70 6f 72 74 69 | 6e 67 20 73 79 73 74 65 | reporti|ng syste|
|00002650| 6d 0a 72 65 71 75 69 72 | 65 20 61 63 74 69 76 65 |m.requir|e active|
|00002660| 20 66 6f 72 6d 73 20 74 | 68 61 74 20 61 72 65 20 | forms t|hat are |
|00002670| 70 61 73 73 65 64 20 66 | 72 6f 6d 20 6f 6e 65 20 |passed f|rom one |
|00002680| 75 73 65 72 20 74 6f 20 | 61 6e 6f 74 68 65 72 20 |user to |another |
|00002690| 5b 54 53 49 43 38 32 2c | 20 52 4f 57 45 38 32 5d |[TSIC82,| ROWE82]|
|000026a0| 2e 0a 49 6e 20 61 20 62 | 75 67 20 72 65 70 6f 72 |..In a b|ug repor|
|000026b0| 74 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2c 20 74 |t applic|ation, t|
|000026c0| 68 65 20 6d 61 6e 61 67 | 65 72 20 6f 66 20 74 68 |he manag|er of th|
|000026d0| 65 20 70 72 6f 67 72 61 | 6d 20 6d 61 69 6e 74 65 |e progra|m mainte|
|000026e0| 6e 61 6e 63 65 20 67 72 | 6f 75 70 0a 73 68 6f 75 |nance gr|oup.shou|
|000026f0| 6c 64 20 62 65 20 6e 6f | 74 69 66 69 65 64 20 69 |ld be no|tified i|
|00002700| 66 20 61 20 68 69 67 68 | 20 70 72 69 6f 72 69 74 |f a high| priorit|
|00002710| 79 20 62 75 67 20 74 68 | 61 74 20 68 61 73 20 62 |y bug th|at has b|
|00002720| 65 65 6e 20 61 73 73 69 | 67 6e 65 64 20 74 6f 20 |een assi|gned to |
|00002730| 61 20 70 72 6f 67 72 61 | 6d 6d 65 72 0a 68 61 73 |a progra|mmer.has|
|00002740| 20 6e 6f 74 20 62 65 65 | 6e 20 66 69 78 65 64 20 | not bee|n fixed |
|00002750| 62 79 20 61 20 73 70 65 | 63 69 66 69 65 64 20 64 |by a spe|cified d|
|00002760| 61 74 65 2e 0a 41 20 64 | 61 74 61 62 61 73 65 20 |ate..A d|atabase |
|00002770| 61 6c 65 72 74 65 72 20 | 69 73 20 6e 65 65 64 65 |alerter |is neede|
|00002780| 64 20 74 68 61 74 20 77 | 69 6c 6c 20 73 65 6e 64 |d that w|ill send|
|00002790| 20 61 20 6d 65 73 73 61 | 67 65 20 74 6f 20 74 68 | a messa|ge to th|
|000027a0| 65 20 6d 61 6e 61 67 65 | 72 20 63 61 6c 6c 69 6e |e manage|r callin|
|000027b0| 67 0a 68 69 73 20 61 74 | 74 65 6e 74 69 6f 6e 20 |g.his at|tention |
|000027c0| 74 6f 20 74 68 65 20 70 | 72 6f 62 6c 65 6d 2e 0a |to the p|roblem..|
|000027d0| 54 72 69 67 67 65 72 73 | 20 63 61 6e 20 62 65 20 |Triggers| can be |
|000027e0| 75 73 65 64 20 74 6f 20 | 70 72 6f 70 61 67 61 74 |used to |propagat|
|000027f0| 65 20 75 70 64 61 74 65 | 73 20 69 6e 20 74 68 65 |e update|s in the|
|00002800| 20 64 61 74 61 62 61 73 | 65 20 74 6f 20 6d 61 69 | databas|e to mai|
|00002810| 6e 74 61 69 6e 20 0a 63 | 6f 6e 73 69 73 74 65 6e |ntain .c|onsisten|
|00002820| 63 79 2e 0a 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |cy..For |example,|
|00002830| 20 64 65 6c 65 74 69 6e | 67 20 61 20 64 65 70 61 | deletin|g a depa|
|00002840| 72 74 6d 65 6e 74 20 74 | 75 70 6c 65 20 69 6e 20 |rtment t|uple in |
|00002850| 74 68 65 20 44 45 50 54 | 20 72 65 6c 61 74 69 6f |the DEPT| relatio|
|00002860| 6e 0a 6d 69 67 68 74 20 | 74 72 69 67 67 65 72 20 |n.might |trigger |
|00002870| 61 6e 20 75 70 64 61 74 | 65 20 74 6f 20 64 65 6c |an updat|e to del|
|00002880| 65 74 65 20 61 6c 6c 20 | 65 6d 70 6c 6f 79 65 65 |ete all |employee|
|00002890| 73 20 69 6e 20 74 68 61 | 74 20 64 65 70 61 72 74 |s in tha|t depart|
|000028a0| 6d 65 6e 74 20 0a 69 6e | 20 74 68 65 20 45 4d 50 |ment .in| the EMP|
|000028b0| 20 72 65 6c 61 74 69 6f | 6e 2e 0a 2e 70 70 0a 49 | relatio|n...pp.I|
|000028c0| 6e 20 61 64 64 69 74 69 | 6f 6e 2c 20 6d 61 6e 79 |n additi|on, many|
|000028d0| 20 65 78 70 65 72 74 20 | 73 79 73 74 65 6d 20 61 | expert |system a|
|000028e0| 70 70 6c 69 63 61 74 69 | 6f 6e 73 20 6f 70 65 72 |pplicati|ons oper|
|000028f0| 61 74 65 20 6f 6e 20 64 | 61 74 61 0a 74 68 61 74 |ate on d|ata.that|
|00002900| 20 69 73 20 6d 6f 72 65 | 20 65 61 73 69 6c 79 20 | is more| easily |
|00002910| 64 65 73 63 72 69 62 65 | 64 20 61 73 20 72 75 6c |describe|d as rul|
|00002920| 65 73 20 72 61 74 68 65 | 72 20 74 68 61 6e 20 61 |es rathe|r than a|
|00002930| 73 20 64 61 74 61 20 76 | 61 6c 75 65 73 2e 20 20 |s data v|alues. |
|00002940| 0a 46 6f 72 20 65 78 61 | 6d 70 6c 65 2c 20 74 68 |.For exa|mple, th|
|00002950| 65 20 74 65 61 63 68 69 | 6e 67 20 6c 6f 61 64 20 |e teachi|ng load |
|00002960| 6f 66 20 70 72 6f 66 65 | 73 73 6f 72 73 20 0a 69 |of profe|ssors .i|
|00002970| 6e 20 74 68 65 20 45 45 | 43 53 20 64 65 70 61 72 |n the EE|CS depar|
|00002980| 74 6d 65 6e 74 20 63 61 | 6e 20 62 65 20 64 65 73 |tment ca|n be des|
|00002990| 63 72 69 62 65 64 20 62 | 79 20 74 68 65 20 66 6f |cribed b|y the fo|
|000029a0| 6c 6c 6f 77 69 6e 67 20 | 72 75 6c 65 73 3a 0a 2e |llowing |rules:..|
|000029b0| 69 6e 20 2b 38 6e 0a 2e | 73 70 20 30 2e 35 76 0a |in +8n..|sp 0.5v.|
|000029c0| 2e 74 69 20 2d 33 6e 0a | 31 29 5c 20 54 68 65 20 |.ti -3n.|1)\ The |
|000029d0| 6e 6f 72 6d 61 6c 20 6c | 6f 61 64 20 69 73 20 38 |normal l|oad is 8|
|000029e0| 20 63 6f 6e 74 61 63 74 | 20 68 6f 75 72 73 20 70 | contact| hours p|
|000029f0| 65 72 20 79 65 61 72 0a | 2e 73 70 20 30 2e 35 76 |er year.|.sp 0.5v|
|00002a00| 0a 2e 74 69 20 2d 33 6e | 0a 32 29 5c 20 54 68 65 |..ti -3n|.2)\ The|
|00002a10| 20 73 63 68 65 64 75 6c | 69 6e 67 20 6f 66 66 69 | schedul|ing offi|
|00002a20| 63 65 72 20 67 65 74 73 | 20 61 20 32 35 20 70 65 |cer gets| a 25 pe|
|00002a30| 72 63 65 6e 74 20 72 65 | 64 75 63 74 69 6f 6e 0a |rcent re|duction.|
|00002a40| 2e 73 70 20 30 2e 35 76 | 0a 2e 74 69 20 2d 33 6e |.sp 0.5v|..ti -3n|
|00002a50| 0a 33 29 5c 20 54 68 65 | 20 63 68 61 69 72 6d 61 |.3)\ The| chairma|
|00002a60| 6e 20 64 6f 65 73 20 6e | 6f 74 20 68 61 76 65 20 |n does n|ot have |
|00002a70| 74 6f 20 74 65 61 63 68 | 0a 2e 73 70 20 30 2e 35 |to teach|..sp 0.5|
|00002a80| 76 0a 2e 74 69 20 2d 33 | 6e 0a 34 29 5c 20 46 61 |v..ti -3|n.4)\ Fa|
|00002a90| 63 75 6c 74 79 20 6f 6e | 20 72 65 73 65 61 72 63 |culty on| researc|
|00002aa0| 68 20 6c 65 61 76 65 20 | 72 65 63 65 69 76 65 20 |h leave |receive |
|00002ab0| 61 20 72 65 64 75 63 74 | 69 6f 6e 20 70 72 6f 70 |a reduct|ion prop|
|00002ac0| 6f 72 74 69 6f 6e 61 6c | 20 74 6f 20 74 68 65 69 |ortional| to thei|
|00002ad0| 72 20 6c 65 61 76 65 20 | 66 72 61 63 74 69 6f 6e |r leave |fraction|
|00002ae0| 0a 2e 73 70 20 30 2e 35 | 76 0a 2e 74 69 20 2d 33 |..sp 0.5|v..ti -3|
|00002af0| 6e 0a 35 29 5c 20 43 6f | 75 72 73 65 73 20 77 69 |n.5)\ Co|urses wi|
|00002b00| 74 68 20 6c 65 73 73 20 | 74 68 61 6e 20 31 30 20 |th less |than 10 |
|00002b10| 73 74 75 64 65 6e 74 73 | 20 67 65 6e 65 72 61 74 |students| generat|
|00002b20| 65 20 63 72 65 64 69 74 | 20 61 74 20 30 2e 31 20 |e credit| at 0.1 |
|00002b30| 63 6f 6e 74 61 63 74 20 | 68 6f 75 72 73 20 70 65 |contact |hours pe|
|00002b40| 72 20 73 74 75 64 65 6e | 74 0a 2e 73 70 20 30 2e |r studen|t..sp 0.|
|00002b50| 35 76 0a 2e 74 69 20 2d | 33 6e 0a 36 29 5c 20 43 |5v..ti -|3n.6)\ C|
|00002b60| 6f 75 72 73 65 73 20 77 | 69 74 68 20 6d 6f 72 65 |ourses w|ith more|
|00002b70| 20 74 68 61 6e 20 35 30 | 20 73 74 75 64 65 6e 74 | than 50| student|
|00002b80| 73 20 67 65 6e 65 72 61 | 74 65 20 45 58 54 52 41 |s genera|te EXTRA|
|00002b90| 20 63 6f 6e 74 61 63 74 | 20 68 6f 75 72 73 20 61 | contact| hours a|
|00002ba0| 74 20 61 20 72 61 74 65 | 20 6f 66 0a 30 2e 30 31 |t a rate| of.0.01|
|00002bb0| 20 70 65 72 20 73 74 75 | 64 65 6e 74 20 69 6e 20 | per stu|dent in |
|00002bc0| 65 78 63 65 73 73 20 6f | 66 20 35 30 20 0a 2e 73 |excess o|f 50 ..s|
|00002bd0| 70 20 30 2e 35 76 0a 2e | 74 69 20 2d 33 6e 0a 37 |p 0.5v..|ti -3n.7|
|00002be0| 29 5c 20 46 61 63 75 6c | 74 79 20 63 61 6e 20 68 |)\ Facul|ty can h|
|00002bf0| 61 76 65 20 61 20 63 72 | 65 64 69 74 20 62 61 6c |ave a cr|edit bal|
|00002c00| 61 6e 63 65 20 6f 72 20 | 61 20 64 65 66 69 63 69 |ance or |a defici|
|00002c10| 74 20 6f 66 20 75 70 20 | 74 6f 20 32 20 63 6f 6e |t of up |to 2 con|
|00002c20| 74 61 63 74 20 68 6f 75 | 72 73 0a 2e 73 70 0a 2e |tact hou|rs..sp..|
|00002c30| 69 6e 20 2d 38 6e 0a 54 | 68 65 73 65 20 72 75 6c |in -8n.T|hese rul|
|00002c40| 65 73 20 61 72 65 20 73 | 75 62 6a 65 63 74 20 74 |es are s|ubject t|
|00002c50| 6f 20 66 72 65 71 75 65 | 6e 74 20 63 68 61 6e 67 |o freque|nt chang|
|00002c60| 65 2e 20 20 0a 54 68 65 | 20 6c 65 61 76 65 20 73 |e. .The| leave s|
|00002c70| 74 61 74 75 73 2c 20 63 | 6f 75 72 73 65 20 61 73 |tatus, c|ourse as|
|00002c80| 73 69 67 6e 6d 65 6e 74 | 73 2c 20 61 6e 64 20 61 |signment|s, and a|
|00002c90| 64 6d 69 6e 69 73 74 72 | 61 74 69 76 65 20 61 73 |dministr|ative as|
|00002ca0| 73 69 67 6e 6d 65 6e 74 | 73 0a 28 65 2e 67 2e 2c |signment|s.(e.g.,|
|00002cb0| 20 63 68 61 69 72 6d 61 | 6e 20 61 6e 64 20 73 63 | chairma|n and sc|
|00002cc0| 68 65 64 75 6c 69 6e 67 | 20 6f 66 66 69 63 65 72 |heduling| officer|
|00002cd0| 29 20 61 6c 6c 20 63 68 | 61 6e 67 65 20 66 72 65 |) all ch|ange fre|
|00002ce0| 71 75 65 6e 74 6c 79 2e | 20 20 0a 49 74 20 77 6f |quently.| .It wo|
|00002cf0| 75 6c 64 20 62 65 20 6d | 6f 73 74 20 6e 61 74 75 |uld be m|ost natu|
|00002d00| 72 61 6c 20 74 6f 20 73 | 74 6f 72 65 0a 74 68 65 |ral to s|tore.the|
|00002d10| 20 61 62 6f 76 65 20 72 | 75 6c 65 73 20 69 6e 20 | above r|ules in |
|00002d20| 61 20 44 42 4d 53 20 61 | 6e 64 20 74 68 65 6e 20 |a DBMS a|nd then |
|00002d30| 69 6e 66 65 72 20 74 68 | 65 20 61 63 74 75 61 6c |infer th|e actual|
|00002d40| 20 74 65 61 63 68 69 6e | 67 20 6c 6f 61 64 20 6f | teachin|g load o|
|00002d50| 66 0a 69 6e 64 69 76 69 | 64 75 61 6c 20 66 61 63 |f.indivi|dual fac|
|00002d60| 75 6c 74 79 20 72 61 74 | 68 65 72 20 74 68 61 6e |ulty rat|her than|
|00002d70| 20 73 74 6f 72 69 6e 67 | 20 74 65 61 63 68 69 6e | storing| teachin|
|00002d80| 67 20 6c 6f 61 64 20 61 | 73 20 6f 72 64 69 6e 61 |g load a|s ordina|
|00002d90| 72 79 20 64 61 74 61 0a | 61 6e 64 20 74 68 65 6e |ry data.|and then|
|00002da0| 20 61 74 74 65 6d 70 74 | 69 6e 67 20 74 6f 20 65 | attempt|ing to e|
|00002db0| 6e 66 6f 72 63 65 20 74 | 68 65 20 61 62 6f 76 65 |nforce t|he above|
|00002dc0| 20 72 75 6c 65 73 20 62 | 79 20 61 20 63 6f 6c 6c | rules b|y a coll|
|00002dd0| 65 63 74 69 6f 6e 20 6f | 66 0a 63 6f 6d 70 6c 65 |ection o|f.comple|
|00002de0| 78 20 69 6e 74 65 67 72 | 69 74 79 20 63 6f 6e 73 |x integr|ity cons|
|00002df0| 74 72 61 69 6e 74 73 2e | 0a 43 6f 6e 73 65 71 75 |traints.|.Consequ|
|00002e00| 65 6e 74 6c 79 2c 20 6f | 75 72 20 74 68 69 72 64 |ently, o|ur third|
|00002e10| 20 67 6f 61 6c 20 69 73 | 20 74 6f 20 73 75 70 70 | goal is| to supp|
|00002e20| 6f 72 74 20 61 6c 65 72 | 74 65 72 73 2c 20 74 72 |ort aler|ters, tr|
|00002e30| 69 67 67 65 72 73 2c 20 | 61 6e 64 20 67 65 6e 65 |iggers, |and gene|
|00002e40| 72 61 6c 20 72 75 6c 65 | 20 70 72 6f 63 65 73 73 |ral rule| process|
|00002e50| 69 6e 67 2e 0a 2e 70 70 | 0a 54 68 65 20 66 6f 75 |ing...pp|.The fou|
|00002e60| 72 74 68 20 67 6f 61 6c | 20 66 6f 72 20 50 4f 53 |rth goal| for POS|
|00002e70| 54 47 52 45 53 20 69 73 | 20 74 6f 20 72 65 64 75 |TGRES is| to redu|
|00002e80| 63 65 20 74 68 65 20 61 | 6d 6f 75 6e 74 20 6f 66 |ce the a|mount of|
|00002e90| 20 63 6f 64 65 20 69 6e | 20 74 68 65 20 44 42 4d | code in| the DBM|
|00002ea0| 53 20 77 72 69 74 74 65 | 6e 0a 74 6f 20 73 75 70 |S writte|n.to sup|
|00002eb0| 70 6f 72 74 20 63 72 61 | 73 68 20 72 65 63 6f 76 |port cra|sh recov|
|00002ec0| 65 72 79 2e 0a 4d 6f 73 | 74 20 44 42 4d 53 27 73 |ery..Mos|t DBMS's|
|00002ed0| 20 68 61 76 65 20 61 20 | 6c 61 72 67 65 20 61 6d | have a |large am|
|00002ee0| 6f 75 6e 74 20 6f 66 20 | 63 72 61 73 68 20 72 65 |ount of |crash re|
|00002ef0| 63 6f 76 65 72 79 20 63 | 6f 64 65 20 74 68 61 74 |covery c|ode that|
|00002f00| 0a 69 73 20 74 72 69 63 | 6b 79 20 74 6f 20 77 72 |.is tric|ky to wr|
|00002f10| 69 74 65 2c 20 66 75 6c | 6c 20 6f 66 20 73 70 65 |ite, ful|l of spe|
|00002f20| 63 69 61 6c 20 63 61 73 | 65 73 2c 20 61 6e 64 20 |cial cas|es, and |
|00002f30| 76 65 72 79 20 64 69 66 | 66 69 63 75 6c 74 20 74 |very dif|ficult t|
|00002f40| 6f 20 74 65 73 74 20 61 | 6e 64 20 64 65 62 75 67 |o test a|nd debug|
|00002f50| 2e 20 20 0a 42 65 63 61 | 75 73 65 20 6f 6e 65 20 |. .Beca|use one |
|00002f60| 6f 66 20 6f 75 72 20 67 | 6f 61 6c 73 20 69 73 20 |of our g|oals is |
|00002f70| 74 6f 20 61 6c 6c 6f 77 | 20 75 73 65 72 2d 64 65 |to allow| user-de|
|00002f80| 66 69 6e 65 64 20 61 63 | 63 65 73 73 20 6d 65 74 |fined ac|cess met|
|00002f90| 68 6f 64 73 2c 20 69 74 | 20 69 73 20 69 6d 70 65 |hods, it| is impe|
|00002fa0| 72 61 74 69 76 65 0a 74 | 68 61 74 20 74 68 65 20 |rative.t|hat the |
|00002fb0| 6d 6f 64 65 6c 20 66 6f | 72 20 63 72 61 73 68 20 |model fo|r crash |
|00002fc0| 72 65 63 6f 76 65 72 79 | 20 62 65 20 61 73 20 73 |recovery| be as s|
|00002fd0| 69 6d 70 6c 65 20 61 73 | 20 70 6f 73 73 69 62 6c |imple as| possibl|
|00002fe0| 65 20 61 6e 64 20 65 61 | 73 69 6c 79 20 65 78 74 |e and ea|sily ext|
|00002ff0| 65 6e 64 69 62 6c 65 2e | 0a 4f 75 72 20 70 72 6f |endible.|.Our pro|
|00003000| 70 6f 73 65 64 20 61 70 | 70 72 6f 61 63 68 20 69 |posed ap|proach i|
|00003010| 73 20 74 6f 20 74 72 65 | 61 74 20 74 68 65 20 6c |s to tre|at the l|
|00003020| 6f 67 20 61 73 20 6e 6f | 72 6d 61 6c 20 64 61 74 |og as no|rmal dat|
|00003030| 61 20 6d 61 6e 61 67 65 | 64 20 62 79 20 74 68 65 |a manage|d by the|
|00003040| 0a 44 42 4d 53 20 77 68 | 69 63 68 20 77 69 6c 6c |.DBMS wh|ich will|
|00003050| 20 73 69 6d 70 6c 69 66 | 79 20 74 68 65 20 72 65 | simplif|y the re|
|00003060| 63 6f 76 65 72 79 20 63 | 6f 64 65 20 61 6e 64 20 |covery c|ode and |
|00003070| 73 69 6d 75 6c 74 61 6e | 65 6f 75 73 6c 79 20 70 |simultan|eously p|
|00003080| 72 6f 76 69 64 65 0a 73 | 75 70 70 6f 72 74 20 66 |rovide.s|upport f|
|00003090| 6f 72 20 61 63 63 65 73 | 73 20 74 6f 20 74 68 65 |or acces|s to the|
|000030a0| 20 68 69 73 74 6f 72 69 | 63 61 6c 20 64 61 74 61 | histori|cal data|
|000030b0| 2e 0a 2e 70 70 0a 4f 75 | 72 20 6e 65 78 74 20 67 |...pp.Ou|r next g|
|000030c0| 6f 61 6c 20 69 73 20 74 | 6f 20 6d 61 6b 65 20 75 |oal is t|o make u|
|000030d0| 73 65 20 6f 66 20 6e 65 | 77 20 74 65 63 68 6e 6f |se of ne|w techno|
|000030e0| 6c 6f 67 69 65 73 20 77 | 68 65 6e 65 76 65 72 20 |logies w|henever |
|000030f0| 70 6f 73 73 69 62 6c 65 | 2e 0a 4f 70 74 69 63 61 |possible|..Optica|
|00003100| 6c 20 64 69 73 6b 73 20 | 28 65 76 65 6e 20 77 72 |l disks |(even wr|
|00003110| 69 74 61 62 6c 65 20 6f | 70 74 69 63 61 6c 20 64 |itable o|ptical d|
|00003120| 69 73 6b 73 29 20 61 72 | 65 20 62 65 63 6f 6d 69 |isks) ar|e becomi|
|00003130| 6e 67 20 61 76 61 69 6c | 61 62 6c 65 20 0a 69 6e |ng avail|able .in|
|00003140| 20 74 68 65 20 63 6f 6d | 6d 65 72 63 69 61 6c 20 | the com|mercial |
|00003150| 6d 61 72 6b 65 74 70 6c | 61 63 65 2e 0a 41 6c 74 |marketpl|ace..Alt|
|00003160| 68 6f 75 67 68 20 74 68 | 65 79 20 68 61 76 65 20 |hough th|ey have |
|00003170| 73 6c 6f 77 65 72 20 61 | 63 63 65 73 73 20 63 68 |slower a|ccess ch|
|00003180| 61 72 61 63 74 65 72 69 | 73 74 69 63 73 2c 20 0a |aracteri|stics, .|
|00003190| 74 68 65 69 72 20 70 72 | 69 63 65 2d 70 65 72 66 |their pr|ice-perf|
|000031a0| 6f 72 6d 61 6e 63 65 20 | 61 6e 64 20 72 65 6c 69 |ormance |and reli|
|000031b0| 61 62 69 6c 69 74 79 20 | 6d 61 79 20 70 72 6f 76 |ability |may prov|
|000031c0| 65 20 61 74 74 72 61 63 | 74 69 76 65 2e 0a 41 20 |e attrac|tive..A |
|000031d0| 73 79 73 74 65 6d 20 64 | 65 73 69 67 6e 20 74 68 |system d|esign th|
|000031e0| 61 74 20 69 6e 63 6c 75 | 64 65 73 20 6f 70 74 69 |at inclu|des opti|
|000031f0| 63 61 6c 20 64 69 73 6b | 73 20 69 6e 20 74 68 65 |cal disk|s in the|
|00003200| 0a 73 74 6f 72 61 67 65 | 20 68 69 65 72 61 72 63 |.storage| hierarc|
|00003210| 68 79 20 77 69 6c 6c 20 | 68 61 76 65 20 61 6e 20 |hy will |have an |
|00003220| 61 64 76 61 6e 74 61 67 | 65 2e 0a 41 6e 6f 74 68 |advantag|e..Anoth|
|00003230| 65 72 20 74 65 63 68 6e | 6f 6c 6f 67 79 20 74 68 |er techn|ology th|
|00003240| 61 74 20 77 65 20 66 6f | 72 73 65 65 20 69 73 20 |at we fo|rsee is |
|00003250| 77 6f 72 6b 73 74 61 74 | 69 6f 6e 2d 73 69 7a 65 |workstat|ion-size|
|00003260| 64 20 70 72 6f 63 65 73 | 73 6f 72 73 20 77 69 74 |d proces|sors wit|
|00003270| 68 0a 73 65 76 65 72 61 | 6c 20 43 50 55 27 73 2e |h.severa|l CPU's.|
|00003280| 20 20 0a 57 65 20 77 61 | 6e 74 20 74 6f 20 64 65 | .We wa|nt to de|
|00003290| 73 69 67 6e 20 50 4f 53 | 54 47 52 45 53 20 69 6e |sign POS|TGRES in|
|000032a0| 20 73 75 63 68 20 77 61 | 79 20 61 73 20 74 6f 20 | such wa|y as to |
|000032b0| 74 61 6b 65 20 61 64 76 | 61 6e 74 61 67 65 20 6f |take adv|antage o|
|000032c0| 66 20 74 68 65 73 65 0a | 43 50 55 20 72 65 73 6f |f these.|CPU reso|
|000032d0| 75 72 63 65 73 2e 0a 4c | 61 73 74 6c 79 2c 20 61 |urces..L|astly, a|
|000032e0| 20 64 65 73 69 67 6e 20 | 74 68 61 74 20 63 6f 75 | design |that cou|
|000032f0| 6c 64 20 75 74 69 6c 69 | 7a 65 20 73 70 65 63 69 |ld utili|ze speci|
|00003300| 61 6c 20 70 75 72 70 6f | 73 65 20 68 61 72 64 77 |al purpo|se hardw|
|00003310| 61 72 65 20 65 66 66 65 | 63 74 69 76 65 6c 79 20 |are effe|ctively |
|00003320| 6d 69 67 68 74 0a 6d 61 | 6b 65 20 61 20 63 6f 6e |might.ma|ke a con|
|00003330| 76 69 6e 63 69 6e 67 20 | 63 61 73 65 20 66 6f 72 |vincing |case for|
|00003340| 20 64 65 73 69 67 6e 69 | 6e 67 20 61 6e 64 20 69 | designi|ng and i|
|00003350| 6d 70 6c 65 6d 65 6e 74 | 69 6e 67 20 63 75 73 74 |mplement|ing cust|
|00003360| 6f 6d 20 64 65 73 69 67 | 6e 65 64 20 56 4c 53 49 |om desig|ned VLSI|
|00003370| 20 63 68 69 70 73 2e 0a | 4f 75 72 20 66 69 66 74 | chips..|Our fift|
|00003380| 68 20 67 6f 61 6c 2c 20 | 74 68 65 6e 2c 20 69 73 |h goal, |then, is|
|00003390| 20 74 6f 20 69 6e 76 65 | 73 74 69 67 61 74 65 20 | to inve|stigate |
|000033a0| 61 20 64 65 73 69 67 6e | 20 74 68 61 74 20 0a 63 |a design| that .c|
|000033b0| 61 6e 20 65 66 66 65 63 | 74 69 76 65 6c 79 20 75 |an effec|tively u|
|000033c0| 74 69 6c 69 7a 65 20 61 | 6e 20 6f 70 74 69 63 61 |tilize a|n optica|
|000033d0| 6c 20 64 69 73 6b 2c 20 | 73 65 76 65 72 61 6c 20 |l disk, |several |
|000033e0| 74 69 67 68 74 6c 79 20 | 0a 63 6f 75 70 6c 65 64 |tightly |.coupled|
|000033f0| 20 70 72 6f 63 65 73 73 | 6f 72 73 20 61 6e 64 20 | process|ors and |
|00003400| 63 75 73 74 6f 6d 20 64 | 65 73 69 67 6e 65 64 20 |custom d|esigned |
|00003410| 56 4c 53 49 20 63 68 69 | 70 73 2e 0a 2e 70 70 0a |VLSI chi|ps...pp.|
|00003420| 54 68 65 20 6c 61 73 74 | 20 67 6f 61 6c 20 66 6f |The last| goal fo|
|00003430| 72 20 50 4f 53 54 47 52 | 45 53 20 69 73 20 74 6f |r POSTGR|ES is to|
|00003440| 20 6d 61 6b 65 20 61 73 | 20 66 65 77 0a 63 68 61 | make as| few.cha|
|00003450| 6e 67 65 73 20 74 6f 20 | 74 68 65 20 72 65 6c 61 |nges to |the rela|
|00003460| 74 69 6f 6e 61 6c 20 6d | 6f 64 65 6c 20 61 73 20 |tional m|odel as |
|00003470| 70 6f 73 73 69 62 6c 65 | 2e 20 20 0a 46 69 72 73 |possible|. .Firs|
|00003480| 74 2c 20 6d 61 6e 79 20 | 75 73 65 72 73 20 69 6e |t, many |users in|
|00003490| 20 74 68 65 20 62 75 73 | 69 6e 65 73 73 20 64 61 | the bus|iness da|
|000034a0| 74 61 20 70 72 6f 63 65 | 73 73 69 6e 67 20 77 6f |ta proce|ssing wo|
|000034b0| 72 6c 64 20 0a 77 69 6c | 6c 20 62 65 63 6f 6d 65 |rld .wil|l become|
|000034c0| 20 66 61 6d 69 6c 69 61 | 72 20 77 69 74 68 20 72 | familia|r with r|
|000034d0| 65 6c 61 74 69 6f 6e 61 | 6c 20 63 6f 6e 63 65 70 |elationa|l concep|
|000034e0| 74 73 20 61 6e 64 20 20 | 0a 74 68 69 73 20 66 72 |ts and |.this fr|
|000034f0| 61 6d 65 77 6f 72 6b 20 | 73 68 6f 75 6c 64 20 62 |amework |should b|
|00003500| 65 20 70 72 65 73 65 72 | 76 65 64 20 69 66 20 70 |e preser|ved if p|
|00003510| 6f 73 73 69 62 6c 65 2e | 20 20 0a 53 65 63 6f 6e |ossible.| .Secon|
|00003520| 64 2c 20 77 65 20 62 65 | 6c 69 65 76 65 20 74 68 |d, we be|lieve th|
|00003530| 65 20 6f 72 69 67 69 6e | 61 6c 20 60 60 73 70 61 |e origin|al ``spa|
|00003540| 72 74 61 6e 20 73 69 6d | 70 6c 69 63 69 74 79 27 |rtan sim|plicity'|
|00003550| 27 20 61 72 67 75 6d 65 | 6e 74 20 6d 61 64 65 20 |' argume|nt made |
|00003560| 62 79 20 43 6f 64 64 0a | 5b 43 4f 44 44 37 30 5d |by Codd.|[CODD70]|
|00003570| 20 69 73 20 61 73 20 74 | 72 75 65 20 74 6f 64 61 | is as t|rue toda|
|00003580| 79 20 61 73 20 69 6e 20 | 31 39 37 30 2e 20 20 0a |y as in |1970. .|
|00003590| 4c 61 73 74 6c 79 2c 20 | 74 68 65 72 65 20 61 72 |Lastly, |there ar|
|000035a0| 65 20 6d 61 6e 79 20 73 | 65 6d 61 6e 74 69 63 20 |e many s|emantic |
|000035b0| 64 61 74 61 20 6d 6f 64 | 65 6c 73 20 62 75 74 20 |data mod|els but |
|000035c0| 74 68 65 72 65 20 64 6f | 65 73 20 6e 6f 74 20 61 |there do|es not a|
|000035d0| 70 70 65 61 72 20 74 6f | 0a 62 65 20 61 20 73 6d |ppear to|.be a sm|
|000035e0| 61 6c 6c 20 6d 6f 64 65 | 6c 20 74 68 61 74 20 77 |all mode|l that w|
|000035f0| 69 6c 6c 20 73 6f 6c 76 | 65 20 65 76 65 72 79 6f |ill solv|e everyo|
|00003600| 6e 65 27 73 20 70 72 6f | 62 6c 65 6d 2e 0a 46 6f |ne's pro|blem..Fo|
|00003610| 72 20 65 78 61 6d 70 6c | 65 2c 20 61 20 67 65 6e |r exampl|e, a gen|
|00003620| 65 72 61 6c 69 7a 61 74 | 69 6f 6e 20 68 69 65 72 |eralizat|ion hier|
|00003630| 61 72 63 68 79 20 77 69 | 6c 6c 20 6e 6f 74 20 73 |archy wi|ll not s|
|00003640| 6f 6c 76 65 20 74 68 65 | 20 70 72 6f 62 6c 65 6d |olve the| problem|
|00003650| 20 6f 66 20 73 74 72 75 | 63 74 75 72 69 6e 67 0a | of stru|cturing.|
|00003660| 43 41 44 20 64 61 74 61 | 20 61 6e 64 20 74 68 65 |CAD data| and the|
|00003670| 20 64 65 73 69 67 6e 20 | 6d 6f 64 65 6c 73 20 64 | design |models d|
|00003680| 65 76 65 6c 6f 70 65 64 | 20 62 79 20 74 68 65 20 |eveloped| by the |
|00003690| 43 41 44 20 63 6f 6d 6d | 75 6e 69 74 79 20 77 69 |CAD comm|unity wi|
|000036a0| 6c 6c 20 6e 6f 74 0a 68 | 61 6e 64 6c 65 20 67 65 |ll not.h|andle ge|
|000036b0| 6e 65 72 61 6c 69 7a 61 | 74 69 6f 6e 20 68 69 65 |neraliza|tion hie|
|000036c0| 72 61 72 63 68 69 65 73 | 2e 0a 52 61 74 68 65 72 |rarchies|..Rather|
|000036d0| 20 74 68 61 6e 20 62 75 | 69 6c 64 69 6e 67 20 61 | than bu|ilding a|
|000036e0| 20 73 79 73 74 65 6d 20 | 74 68 61 74 20 69 73 20 | system |that is |
|000036f0| 62 61 73 65 64 20 6f 6e | 20 61 20 6c 61 72 67 65 |based on| a large|
|00003700| 2c 20 63 6f 6d 70 6c 65 | 78 20 64 61 74 61 20 6d |, comple|x data m|
|00003710| 6f 64 65 6c 2c 0a 77 65 | 20 62 65 6c 69 65 76 65 |odel,.we| believe|
|00003720| 20 61 20 6e 65 77 20 73 | 79 73 74 65 6d 20 73 68 | a new s|ystem sh|
|00003730| 6f 75 6c 64 20 62 65 20 | 62 75 69 6c 74 20 6f 6e |ould be |built on|
|00003740| 20 61 20 73 6d 61 6c 6c | 2c 20 73 69 6d 70 6c 65 | a small|, simple|
|00003750| 20 6d 6f 64 65 6c 20 74 | 68 61 74 20 69 73 0a 65 | model t|hat is.e|
|00003760| 78 74 65 6e 64 69 62 6c | 65 2e 0a 57 65 20 62 65 |xtendibl|e..We be|
|00003770| 6c 69 65 76 65 20 74 68 | 61 74 20 77 65 20 63 61 |lieve th|at we ca|
|00003780| 6e 20 61 63 63 6f 6d 70 | 6c 69 73 68 20 6f 75 72 |n accomp|lish our|
|00003790| 20 67 6f 61 6c 73 0a 77 | 68 69 6c 65 20 70 72 65 | goals.w|hile pre|
|000037a0| 73 65 72 76 69 6e 67 20 | 74 68 65 20 72 65 6c 61 |serving |the rela|
|000037b0| 74 69 6f 6e 61 6c 20 6d | 6f 64 65 6c 2e 20 20 0a |tional m|odel. .|
|000037c0| 4f 74 68 65 72 20 72 65 | 73 65 61 72 63 68 65 72 |Other re|searcher|
|000037d0| 73 20 61 72 65 20 73 74 | 72 69 76 69 6e 67 20 66 |s are st|riving f|
|000037e0| 6f 72 20 73 69 6d 69 6c | 61 72 20 67 6f 61 6c 73 |or simil|ar goals|
|000037f0| 20 62 75 74 20 0a 74 68 | 65 79 20 61 72 65 20 75 | but .th|ey are u|
|00003800| 73 69 6e 67 20 64 69 66 | 66 65 72 65 6e 74 20 61 |sing dif|ferent a|
|00003810| 70 70 72 6f 61 63 68 65 | 73 0a 5b 41 46 53 41 38 |pproache|s.[AFSA8|
|00003820| 35 2c 20 41 54 4b 49 38 | 34 2c 20 43 4f 50 45 38 |5, ATKI8|4, COPE8|
|00003830| 34 2c 20 44 45 52 52 38 | 35 2c 20 4c 4f 52 49 38 |4, DERR8|5, LORI8|
|00003840| 33 2c 20 4c 55 4d 38 35 | 5d 0a 2e 70 70 0a 54 68 |3, LUM85|]..pp.Th|
|00003850| 65 20 72 65 6d 61 69 6e | 64 65 72 20 6f 66 20 74 |e remain|der of t|
|00003860| 68 65 20 70 61 70 65 72 | 20 64 65 73 63 72 69 62 |he paper| describ|
|00003870| 65 73 20 74 68 65 20 64 | 65 73 69 67 6e 20 6f 66 |es the d|esign of|
|00003880| 20 50 4f 53 54 47 52 45 | 53 20 61 6e 64 20 74 68 | POSTGRE|S and th|
|00003890| 65 20 62 61 73 69 63 0a | 73 79 73 74 65 6d 20 61 |e basic.|system a|
|000038a0| 72 63 68 69 74 65 63 74 | 75 72 65 20 77 65 20 70 |rchitect|ure we p|
|000038b0| 72 6f 70 6f 73 65 20 74 | 6f 20 75 73 65 20 74 6f |ropose t|o use to|
|000038c0| 20 69 6d 70 6c 65 6d 65 | 6e 74 20 74 68 65 20 73 | impleme|nt the s|
|000038d0| 79 73 74 65 6d 2e 0a 2e | 73 68 20 31 20 20 22 50 |ystem...|sh 1 "P|
|000038e0| 4f 53 54 51 55 45 4c 22 | 0a 2e 70 70 0a 54 68 69 |OSTQUEL"|..pp.Thi|
|000038f0| 73 20 73 65 63 74 69 6f | 6e 20 64 65 73 63 72 69 |s sectio|n descri|
|00003900| 62 65 73 20 74 68 65 20 | 71 75 65 72 79 20 6c 61 |bes the |query la|
|00003910| 6e 67 75 61 67 65 20 73 | 75 70 70 6f 72 74 65 64 |nguage s|upported|
|00003920| 20 62 79 20 50 4f 53 54 | 47 52 45 53 2e 0a 54 68 | by POST|GRES..Th|
|00003930| 65 20 72 65 6c 61 74 69 | 6f 6e 61 6c 20 6d 6f 64 |e relati|onal mod|
|00003940| 65 6c 20 61 73 20 64 65 | 73 63 72 69 62 65 64 20 |el as de|scribed |
|00003950| 69 6e 20 74 68 65 20 6f | 72 69 67 69 6e 61 6c 20 |in the o|riginal |
|00003960| 64 65 66 69 6e 69 74 69 | 6f 6e 20 62 79 20 43 6f |definiti|on by Co|
|00003970| 64 64 20 5b 43 4f 44 44 | 37 30 5d 20 68 61 73 20 |dd [CODD|70] has |
|00003980| 62 65 65 6e 0a 70 72 65 | 73 65 72 76 65 64 2e 0a |been.pre|served..|
|00003990| 41 20 64 61 74 61 62 61 | 73 65 20 69 73 20 63 6f |A databa|se is co|
|000039a0| 6d 70 6f 73 65 64 20 6f | 66 20 61 20 63 6f 6c 6c |mposed o|f a coll|
|000039b0| 65 63 74 69 6f 6e 20 6f | 66 20 72 65 6c 61 74 69 |ection o|f relati|
|000039c0| 6f 6e 73 20 74 68 61 74 | 20 63 6f 6e 74 61 69 6e |ons that| contain|
|000039d0| 20 74 75 70 6c 65 73 20 | 77 69 74 68 20 74 68 65 | tuples |with the|
|000039e0| 20 73 61 6d 65 0a 66 69 | 65 6c 64 73 20 64 65 66 | same.fi|elds def|
|000039f0| 69 6e 65 64 2c 20 61 6e | 64 20 74 68 65 20 76 61 |ined, an|d the va|
|00003a00| 6c 75 65 73 20 69 6e 20 | 61 20 66 69 65 6c 64 20 |lues in |a field |
|00003a10| 68 61 76 65 20 74 68 65 | 20 73 61 6d 65 20 64 61 |have the| same da|
|00003a20| 74 61 20 74 79 70 65 2e | 0a 54 68 65 20 71 75 65 |ta type.|.The que|
|00003a30| 72 79 20 6c 61 6e 67 75 | 61 67 65 20 69 73 20 62 |ry langu|age is b|
|00003a40| 61 73 65 64 20 6f 6e 20 | 74 68 65 20 49 4e 47 52 |ased on |the INGR|
|00003a50| 45 53 20 71 75 65 72 79 | 20 6c 61 6e 67 75 61 67 |ES query| languag|
|00003a60| 65 20 51 55 45 4c 20 5b | 48 45 4c 44 37 35 5d 2e |e QUEL [|HELD75].|
|00003a70| 0a 53 65 76 65 72 61 6c | 20 65 78 74 65 6e 73 69 |.Several| extensi|
|00003a80| 6f 6e 73 20 61 6e 64 20 | 63 68 61 6e 67 65 73 20 |ons and |changes |
|00003a90| 68 61 76 65 20 62 65 65 | 6e 20 6d 61 64 65 20 74 |have bee|n made t|
|00003aa0| 6f 20 51 55 45 4c 0a 73 | 6f 20 74 68 65 20 6e 65 |o QUEL.s|o the ne|
|00003ab0| 77 20 6c 61 6e 67 75 61 | 67 65 20 69 73 20 63 61 |w langua|ge is ca|
|00003ac0| 6c 6c 65 64 20 50 4f 53 | 54 51 55 45 4c 20 74 6f |lled POS|TQUEL to|
|00003ad0| 20 64 69 73 74 69 6e 67 | 75 69 73 68 0a 69 74 20 | disting|uish.it |
|00003ae0| 66 72 6f 6d 20 74 68 65 | 20 6f 72 69 67 69 6e 61 |from the| origina|
|00003af0| 6c 20 6c 61 6e 67 75 61 | 67 65 20 61 6e 64 20 6f |l langua|ge and o|
|00003b00| 74 68 65 72 20 51 55 45 | 4c 20 65 78 74 65 6e 73 |ther QUE|L extens|
|00003b10| 69 6f 6e 73 20 64 65 73 | 63 72 69 62 65 64 0a 65 |ions des|cribed.e|
|00003b20| 6c 73 65 77 68 65 72 65 | 20 5b 53 54 4f 4e 38 35 |lsewhere| [STON85|
|00003b30| 61 2c 20 4b 55 4e 47 38 | 34 5d 2e 20 20 0a 2e 70 |a, KUNG8|4]. ..p|
|00003b40| 70 0a 4d 6f 73 74 20 6f | 66 20 51 55 45 4c 20 69 |p.Most o|f QUEL i|
|00003b50| 73 20 6c 65 66 74 20 69 | 6e 74 61 63 74 2e 0a 54 |s left i|ntact..T|
|00003b60| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 63 6f 6d |he follo|wing com|
|00003b70| 6d 61 6e 64 73 20 61 72 | 65 20 69 6e 63 6c 75 64 |mands ar|e includ|
|00003b80| 65 64 20 69 6e 20 50 4f | 53 54 51 55 45 4c 20 77 |ed in PO|STQUEL w|
|00003b90| 69 74 68 6f 75 74 20 61 | 6e 79 20 63 68 61 6e 67 |ithout a|ny chang|
|00003ba0| 65 73 3a 0a 43 72 65 61 | 74 65 20 52 65 6c 61 74 |es:.Crea|te Relat|
|00003bb0| 69 6f 6e 2c 0a 44 65 73 | 74 72 6f 79 20 52 65 6c |ion,.Des|troy Rel|
|00003bc0| 61 74 69 6f 6e 2c 0a 41 | 70 70 65 6e 64 2c 20 0a |ation,.A|ppend, .|
|00003bd0| 44 65 6c 65 74 65 2c 20 | 0a 52 65 70 6c 61 63 65 |Delete, |.Replace|
|00003be0| 2c 20 0a 52 65 74 72 69 | 65 76 65 2c 20 0a 52 65 |, .Retri|eve, .Re|
|00003bf0| 74 72 69 65 76 65 20 69 | 6e 74 6f 20 52 65 73 75 |trieve i|nto Resu|
|00003c00| 6c 74 2c 20 0a 44 65 66 | 69 6e 65 20 56 69 65 77 |lt, .Def|ine View|
|00003c10| 2c 20 0a 44 65 66 69 6e | 65 20 49 6e 74 65 67 72 |, .Defin|e Integr|
|00003c20| 69 74 79 2c 20 0a 61 6e | 64 20 0a 44 65 66 69 6e |ity, .an|d .Defin|
|00003c30| 65 20 50 72 6f 74 65 63 | 74 69 6f 6e 2e 0a 54 68 |e Protec|tion..Th|
|00003c40| 65 20 4d 6f 64 69 66 79 | 20 63 6f 6d 6d 61 6e 64 |e Modify| command|
|00003c50| 20 77 68 69 63 68 20 73 | 70 65 63 69 66 69 65 64 | which s|pecified|
|00003c60| 20 74 68 65 20 73 74 6f | 72 61 67 65 20 73 74 72 | the sto|rage str|
|00003c70| 75 63 74 75 72 65 20 66 | 6f 72 20 61 20 72 65 6c |ucture f|or a rel|
|00003c80| 61 74 69 6f 6e 20 68 61 | 73 0a 62 65 65 6e 20 6f |ation ha|s.been o|
|00003c90| 6d 69 74 74 65 64 20 62 | 65 63 61 75 73 65 20 61 |mitted b|ecause a|
|00003ca0| 6c 6c 20 72 65 6c 61 74 | 69 6f 6e 73 20 61 72 65 |ll relat|ions are|
|00003cb0| 20 73 74 6f 72 65 64 20 | 69 6e 20 61 20 70 61 72 | stored |in a par|
|00003cc0| 74 69 63 75 6c 61 72 20 | 0a 73 74 72 75 63 74 75 |ticular |.structu|
|00003cd0| 72 65 20 64 65 73 69 67 | 6e 65 64 20 74 6f 20 73 |re desig|ned to s|
|00003ce0| 75 70 70 6f 72 74 20 68 | 69 73 74 6f 72 69 63 61 |upport h|istorica|
|00003cf0| 6c 20 64 61 74 61 2e 0a | 54 68 65 20 49 6e 64 65 |l data..|The Inde|
|00003d00| 78 20 63 6f 6d 6d 61 6e | 64 20 69 73 20 72 65 74 |x comman|d is ret|
|00003d10| 61 69 6e 65 64 20 73 6f | 20 74 68 61 74 20 6f 74 |ained so| that ot|
|00003d20| 68 65 72 20 61 63 63 65 | 73 73 20 70 61 74 68 73 |her acce|ss paths|
|00003d30| 20 74 6f 20 74 68 65 20 | 64 61 74 61 20 63 61 6e | to the |data can|
|00003d40| 20 62 65 20 64 65 66 69 | 6e 65 64 2e 0a 2e 70 70 | be defi|ned...pp|
|00003d50| 0a 41 6c 74 68 6f 75 67 | 68 20 74 68 65 20 62 61 |.Althoug|h the ba|
|00003d60| 73 69 63 20 73 74 72 75 | 63 74 75 72 65 20 6f 66 |sic stru|cture of|
|00003d70| 20 50 4f 53 54 51 55 45 | 4c 20 69 73 20 76 65 72 | POSTQUE|L is ver|
|00003d80| 79 20 73 69 6d 69 6c 61 | 72 20 74 6f 20 51 55 45 |y simila|r to QUE|
|00003d90| 4c 2c 20 6e 75 6d 65 72 | 6f 75 73 0a 65 78 74 65 |L, numer|ous.exte|
|00003da0| 6e 73 69 6f 6e 73 20 68 | 61 76 65 20 62 65 65 6e |nsions h|ave been|
|00003db0| 20 6d 61 64 65 20 74 6f | 20 73 75 70 70 6f 72 74 | made to| support|
|00003dc0| 20 63 6f 6d 70 6c 65 78 | 20 6f 62 6a 65 63 74 73 | complex| objects|
|00003dd0| 2c 20 75 73 65 72 2d 64 | 65 66 69 6e 65 64 20 64 |, user-d|efined d|
|00003de0| 61 74 61 20 74 79 70 65 | 73 0a 61 6e 64 20 61 63 |ata type|s.and ac|
|00003df0| 63 65 73 73 20 6d 65 74 | 68 6f 64 73 2c 20 74 69 |cess met|hods, ti|
|00003e00| 6d 65 20 76 61 72 79 69 | 6e 67 20 64 61 74 61 20 |me varyi|ng data |
|00003e10| 28 69 2e 65 2e 2c 20 76 | 65 72 73 69 6f 6e 73 2c |(i.e., v|ersions,|
|00003e20| 20 73 6e 61 70 73 68 6f | 74 73 2c 20 61 6e 64 20 | snapsho|ts, and |
|00003e30| 68 69 73 74 6f 72 69 63 | 61 6c 20 64 61 74 61 29 |historic|al data)|
|00003e40| 2c 0a 69 74 65 72 61 74 | 69 6f 6e 20 71 75 65 72 |,.iterat|ion quer|
|00003e50| 69 65 73 2c 20 61 6c 65 | 72 74 65 72 73 2c 20 74 |ies, ale|rters, t|
|00003e60| 72 69 67 67 65 72 73 2c | 20 61 6e 64 20 72 75 6c |riggers,| and rul|
|00003e70| 65 73 2e 0a 54 68 65 73 | 65 20 63 68 61 6e 67 65 |es..Thes|e change|
|00003e80| 73 20 61 72 65 20 64 65 | 73 63 72 69 62 65 64 20 |s are de|scribed |
|00003e90| 69 6e 20 74 68 65 20 73 | 75 62 73 65 63 74 69 6f |in the s|ubsectio|
|00003ea0| 6e 73 20 74 68 61 74 20 | 66 6f 6c 6c 6f 77 2e 20 |ns that |follow. |
|00003eb0| 20 0a 2e 73 68 20 32 20 | 20 22 44 61 74 61 20 44 | ..sh 2 | "Data D|
|00003ec0| 65 66 69 6e 69 74 69 6f | 6e 22 0a 2e 70 70 0a 54 |efinitio|n"..pp.T|
|00003ed0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 62 75 69 |he follo|wing bui|
|00003ee0| 6c 74 2d 69 6e 20 64 61 | 74 61 20 74 79 70 65 73 |lt-in da|ta types|
|00003ef0| 20 61 72 65 20 70 72 6f | 76 69 64 65 64 3b 0a 2e | are pro|vided;..|
|00003f00| 69 6e 20 2b 38 6e 0a 2e | 73 70 0a 2e 74 69 20 2d |in +8n..|sp..ti -|
|00003f10| 33 6e 0a 31 29 5c 20 69 | 6e 74 65 67 65 72 73 2c |3n.1)\ i|ntegers,|
|00003f20| 0a 2e 73 70 20 2b 30 2e | 35 76 0a 2e 74 69 20 2d |..sp +0.|5v..ti -|
|00003f30| 33 6e 0a 32 29 5c 20 66 | 6c 6f 61 74 69 6e 67 20 |3n.2)\ f|loating |
|00003f40| 70 6f 69 6e 74 2c 0a 2e | 73 70 20 2b 30 2e 35 76 |point,..|sp +0.5v|
|00003f50| 0a 2e 74 69 20 2d 33 6e | 0a 33 29 20 66 69 78 65 |..ti -3n|.3) fixe|
|00003f60| 64 20 6c 65 6e 67 74 68 | 20 63 68 61 72 61 63 74 |d length| charact|
|00003f70| 65 72 20 73 74 72 69 6e | 67 73 2c 0a 2e 73 70 20 |er strin|gs,..sp |
|00003f80| 2b 30 2e 35 76 0a 2e 74 | 69 20 2d 33 6e 0a 34 29 |+0.5v..t|i -3n.4)|
|00003f90| 5c 20 75 6e 62 6f 75 6e | 64 65 64 20 76 61 72 79 |\ unboun|ded vary|
|00003fa0| 69 6e 67 20 6c 65 6e 67 | 74 68 20 61 72 72 61 79 |ing leng|th array|
|00003fb0| 73 20 6f 66 20 66 69 78 | 65 64 0a 74 79 70 65 73 |s of fix|ed.types|
|00003fc0| 20 77 69 74 68 20 61 6e | 20 61 72 62 69 74 72 61 | with an| arbitra|
|00003fd0| 72 79 20 6e 75 6d 62 65 | 72 20 6f 66 20 64 69 6d |ry numbe|r of dim|
|00003fe0| 65 6e 73 69 6f 6e 73 2c | 0a 2e 73 70 20 2b 30 2e |ensions,|..sp +0.|
|00003ff0| 35 76 0a 2e 74 69 20 2d | 33 6e 0a 35 29 20 50 4f |5v..ti -|3n.5) PO|
|00004000| 53 54 51 55 45 4c 2c 20 | 61 6e 64 0a 2e 73 70 20 |STQUEL, |and..sp |
|00004010| 2b 30 2e 35 76 0a 2e 74 | 69 20 2d 33 6e 0a 36 29 |+0.5v..t|i -3n.6)|
|00004020| 5c 20 70 72 6f 63 65 64 | 75 72 65 2e 0a 2e 73 70 |\ proced|ure...sp|
|00004030| 0a 2e 69 6e 20 2d 38 6e | 0a 53 63 61 6c 61 72 20 |..in -8n|.Scalar |
|00004040| 74 79 70 65 20 66 69 65 | 6c 64 73 20 28 65 2e 67 |type fie|lds (e.g|
|00004050| 2e 2c 20 69 6e 74 65 67 | 65 72 2c 20 66 6c 6f 61 |., integ|er, floa|
|00004060| 74 69 6e 67 20 70 6f 69 | 6e 74 2c 20 61 6e 64 20 |ting poi|nt, and |
|00004070| 66 69 78 65 64 20 6c 65 | 6e 67 74 68 20 63 68 61 |fixed le|ngth cha|
|00004080| 72 61 63 74 65 72 0a 73 | 74 72 69 6e 67 73 29 20 |racter.s|trings) |
|00004090| 61 72 65 20 72 65 66 65 | 72 65 6e 63 65 64 20 62 |are refe|renced b|
|000040a0| 79 20 74 68 65 20 63 6f | 6e 76 65 6e 74 69 6f 6e |y the co|nvention|
|000040b0| 61 6c 20 64 6f 74 20 6e | 6f 74 61 74 69 6f 6e 20 |al dot n|otation |
|000040c0| 28 65 2e 67 2e 2c 20 45 | 4d 50 2e 6e 61 6d 65 29 |(e.g., E|MP.name)|
|000040d0| 2e 0a 2e 70 70 0a 56 61 | 72 69 61 62 6c 65 20 6c |...pp.Va|riable l|
|000040e0| 65 6e 67 74 68 20 61 72 | 72 61 79 73 20 61 72 65 |ength ar|rays are|
|000040f0| 20 70 72 6f 76 69 64 65 | 64 20 66 6f 72 20 61 70 | provide|d for ap|
|00004100| 70 6c 69 63 61 74 69 6f | 6e 73 20 74 68 61 74 20 |plicatio|ns that |
|00004110| 6e 65 65 64 20 74 6f 20 | 73 74 6f 72 65 20 6c 61 |need to |store la|
|00004120| 72 67 65 0a 68 6f 6d 6f | 67 65 6e 6f 75 73 20 73 |rge.homo|genous s|
|00004130| 65 71 75 65 6e 63 65 73 | 20 6f 66 20 64 61 74 61 |equences| of data|
|00004140| 20 28 65 2e 67 2e 2c 20 | 73 69 67 6e 61 6c 20 70 | (e.g., |signal p|
|00004150| 72 6f 63 65 73 73 69 6e | 67 20 64 61 74 61 2c 20 |rocessin|g data, |
|00004160| 69 6d 61 67 65 2c 20 6f | 72 20 76 6f 69 63 65 29 |image, o|r voice)|
|00004170| 2e 0a 46 69 65 6c 64 73 | 20 6f 66 20 74 68 69 73 |..Fields| of this|
|00004180| 20 74 79 70 65 20 61 72 | 65 20 72 65 66 65 72 65 | type ar|e refere|
|00004190| 6e 63 65 64 20 69 6e 20 | 74 68 65 20 73 74 61 6e |nced in |the stan|
|000041a0| 64 61 72 64 20 77 61 79 | 20 28 65 2e 67 2e 2c 20 |dard way| (e.g., |
|000041b0| 45 4d 50 2e 70 69 63 74 | 75 72 65 5b 69 5d 20 0a |EMP.pict|ure[i] .|
|000041c0| 72 65 66 65 72 73 20 74 | 6f 20 74 68 65 20 69 2d |refers t|o the i-|
|000041d0| 74 68 20 65 6c 65 6d 65 | 6e 74 20 6f 66 20 74 68 |th eleme|nt of th|
|000041e0| 65 20 70 69 63 74 75 72 | 65 20 61 72 72 61 79 29 |e pictur|e array)|
|000041f0| 2e 0a 41 20 73 70 65 63 | 69 61 6c 20 63 61 73 65 |..A spec|ial case|
|00004200| 20 6f 66 20 61 72 72 61 | 79 73 20 69 73 20 74 68 | of arra|ys is th|
|00004210| 65 20 74 65 78 74 20 64 | 61 74 61 20 74 79 70 65 |e text d|ata type|
|00004220| 20 77 68 69 63 68 20 69 | 73 20 61 20 6f 6e 65 2d | which i|s a one-|
|00004230| 64 69 6d 65 6e 73 69 6f | 6e 61 6c 0a 61 72 72 61 |dimensio|nal.arra|
|00004240| 79 20 6f 66 20 63 68 61 | 72 61 63 74 65 72 73 2e |y of cha|racters.|
|00004250| 0a 4e 6f 74 65 20 74 68 | 61 74 20 61 72 72 61 79 |.Note th|at array|
|00004260| 73 20 63 61 6e 20 62 65 | 20 65 78 74 65 6e 64 65 |s can be| extende|
|00004270| 64 20 64 79 6e 61 6d 69 | 63 61 6c 6c 79 2e 0a 2e |d dynami|cally...|
|00004280| 70 70 0a 46 69 65 6c 64 | 73 20 6f 66 20 74 79 70 |pp.Field|s of typ|
|00004290| 65 20 50 4f 53 54 51 55 | 45 4c 20 63 6f 6e 74 61 |e POSTQU|EL conta|
|000042a0| 69 6e 20 61 20 73 65 71 | 75 65 6e 63 65 20 6f 66 |in a seq|uence of|
|000042b0| 20 64 61 74 61 20 6d 61 | 6e 69 70 75 6c 61 74 69 | data ma|nipulati|
|000042c0| 6f 6e 20 63 6f 6d 6d 61 | 6e 64 73 2e 0a 54 68 65 |on comma|nds..The|
|000042d0| 79 20 61 72 65 20 72 65 | 66 65 72 65 6e 63 65 64 |y are re|ferenced|
|000042e0| 20 62 79 20 74 68 65 20 | 63 6f 6e 76 65 6e 74 69 | by the |conventi|
|000042f0| 6f 6e 61 6c 20 64 6f 74 | 20 6e 6f 74 61 74 69 6f |onal dot| notatio|
|00004300| 6e 2e 0a 48 6f 77 65 76 | 65 72 2c 20 69 66 20 61 |n..Howev|er, if a|
|00004310| 20 50 4f 53 54 51 55 45 | 4c 20 66 69 65 6c 64 20 | POSTQUE|L field |
|00004320| 63 6f 6e 74 61 69 6e 73 | 20 61 20 72 65 74 72 69 |contains| a retri|
|00004330| 65 76 65 20 63 6f 6d 6d | 61 6e 64 2c 20 74 68 65 |eve comm|and, the|
|00004340| 20 64 61 74 61 20 73 70 | 65 63 69 66 69 65 64 0a | data sp|ecified.|
|00004350| 62 79 20 74 68 61 74 20 | 63 6f 6d 6d 61 6e 64 20 |by that |command |
|00004360| 63 61 6e 20 62 65 20 69 | 6d 70 6c 69 63 69 74 6c |can be i|mplicitl|
|00004370| 79 20 72 65 66 65 72 65 | 6e 63 65 64 20 62 79 20 |y refere|nced by |
|00004380| 61 20 6d 75 6c 74 69 70 | 6c 65 20 64 6f 74 20 6e |a multip|le dot n|
|00004390| 6f 74 61 74 69 6f 6e 0a | 28 65 2e 67 2e 2c 20 45 |otation.|(e.g., E|
|000043a0| 4d 50 2e 68 6f 62 62 69 | 65 73 2e 62 61 74 74 69 |MP.hobbi|es.batti|
|000043b0| 6e 67 61 76 67 29 20 61 | 73 20 70 72 6f 70 6f 73 |ngavg) a|s propos|
|000043c0| 65 64 20 65 6c 73 65 77 | 68 65 72 65 20 5b 53 54 |ed elsew|here [ST|
|000043d0| 4f 4e 38 34 61 5d 20 61 | 6e 64 20 66 69 72 73 74 |ON84a] a|nd first|
|000043e0| 0a 73 75 67 67 65 73 74 | 65 64 20 62 79 20 5a 61 |.suggest|ed by Za|
|000043f0| 6e 69 6f 6c 6f 20 69 6e | 20 47 45 4d 20 5b 5a 41 |niolo in| GEM [ZA|
|00004400| 4e 49 38 33 5d 2e 0a 2e | 70 70 0a 46 69 65 6c 64 |NI83]...|pp.Field|
|00004410| 73 20 6f 66 20 74 79 70 | 65 20 70 72 6f 63 65 64 |s of typ|e proced|
|00004420| 75 72 65 20 63 6f 6e 74 | 61 69 6e 20 70 72 6f 63 |ure cont|ain proc|
|00004430| 65 64 75 72 65 73 20 77 | 72 69 74 74 65 6e 20 69 |edures w|ritten i|
|00004440| 6e 20 61 20 67 65 6e 65 | 72 61 6c 20 70 75 72 70 |n a gene|ral purp|
|00004450| 6f 73 65 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 0a |ose prog|ramming.|
|00004460| 6c 61 6e 67 75 61 67 65 | 20 77 69 74 68 20 65 6d |language| with em|
|00004470| 62 65 64 64 65 64 20 64 | 61 74 61 20 6d 61 6e 69 |bedded d|ata mani|
|00004480| 70 75 6c 61 74 69 6f 6e | 20 63 6f 6d 6d 61 6e 64 |pulation| command|
|00004490| 73 20 28 65 2e 67 2e 2c | 20 45 51 55 45 4c 20 5b |s (e.g.,| EQUEL [|
|000044a0| 41 4c 4c 4d 37 36 5d 0a | 6f 72 20 52 69 67 65 6c |ALLM76].|or Rigel|
|000044b0| 20 5b 52 4f 57 45 37 39 | 5d 29 2e 0a 46 69 65 6c | [ROWE79|])..Fiel|
|000044c0| 64 73 20 6f 66 20 74 79 | 70 65 20 70 72 6f 63 65 |ds of ty|pe proce|
|000044d0| 64 75 72 65 20 61 6e 64 | 20 50 4f 53 54 51 55 45 |dure and| POSTQUE|
|000044e0| 4c 20 63 61 6e 20 62 65 | 20 65 78 65 63 75 74 65 |L can be| execute|
|000044f0| 64 20 75 73 69 6e 67 20 | 74 68 65 20 45 78 65 63 |d using |the Exec|
|00004500| 75 74 65 20 63 6f 6d 6d | 61 6e 64 2e 0a 53 75 70 |ute comm|and..Sup|
|00004510| 70 6f 73 65 20 77 65 20 | 61 72 65 20 67 69 76 65 |pose we |are give|
|00004520| 6e 20 61 20 72 65 6c 61 | 74 69 6f 6e 20 77 69 74 |n a rela|tion wit|
|00004530| 68 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |h the fo|llowing |
|00004540| 64 65 66 69 6e 69 74 69 | 6f 6e 0a 2e 28 62 0a 45 |definiti|on..(b.E|
|00004550| 4d 50 28 6e 61 6d 65 2c | 20 61 67 65 2c 20 73 61 |MP(name,| age, sa|
|00004560| 6c 61 72 79 2c 20 68 6f | 62 62 69 65 73 2c 20 64 |lary, ho|bbies, d|
|00004570| 65 70 74 29 0a 2e 29 62 | 0a 69 6e 20 77 68 69 63 |ept)..)b|.in whic|
|00004580| 68 20 74 68 65 20 60 60 | 68 6f 62 62 69 65 73 27 |h the ``|hobbies'|
|00004590| 27 20 66 69 65 6c 64 20 | 69 73 20 6f 66 20 74 79 |' field |is of ty|
|000045a0| 70 65 20 50 4f 53 54 51 | 55 45 4c 2e 0a 54 68 61 |pe POSTQ|UEL..Tha|
|000045b0| 74 20 69 73 2c 20 60 60 | 68 6f 62 62 69 65 73 27 |t is, ``|hobbies'|
|000045c0| 27 20 63 6f 6e 74 61 69 | 6e 73 20 71 75 65 72 69 |' contai|ns queri|
|000045d0| 65 73 20 74 68 61 74 20 | 72 65 74 72 69 65 76 65 |es that |retrieve|
|000045e0| 20 64 61 74 61 20 61 62 | 6f 75 74 20 74 68 65 0a | data ab|out the.|
|000045f0| 65 6d 70 6c 6f 79 65 65 | 27 73 20 68 6f 62 62 69 |employee|'s hobbi|
|00004600| 65 73 20 66 72 6f 6d 20 | 6f 74 68 65 72 20 72 65 |es from |other re|
|00004610| 6c 61 74 69 6f 6e 73 2e | 0a 54 68 65 20 66 6f 6c |lations.|.The fol|
|00004620| 6c 6f 77 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 20 77 |lowing c|ommand w|
|00004630| 69 6c 6c 20 65 78 65 63 | 75 74 65 20 74 68 65 20 |ill exec|ute the |
|00004640| 71 75 65 72 69 65 73 20 | 69 6e 20 74 68 61 74 20 |queries |in that |
|00004650| 66 69 65 6c 64 3a 0a 2e | 28 62 0a 65 78 65 63 75 |field:..|(b.execu|
|00004660| 74 65 20 28 45 4d 50 2e | 68 6f 62 62 69 65 73 29 |te (EMP.|hobbies)|
|00004670| 0a 77 68 65 72 65 20 45 | 4d 50 2e 6e 61 6d 65 20 |.where E|MP.name |
|00004680| 3d 20 60 60 53 6d 69 74 | 68 27 27 0a 2e 29 62 0a |= ``Smit|h''..)b.|
|00004690| 54 68 65 20 76 61 6c 75 | 65 20 72 65 74 75 72 6e |The valu|e return|
|000046a0| 65 64 20 62 79 20 74 68 | 69 73 20 63 6f 6d 6d 61 |ed by th|is comma|
|000046b0| 6e 64 20 63 61 6e 20 62 | 65 20 61 20 73 65 71 75 |nd can b|e a sequ|
|000046c0| 65 6e 63 65 20 6f 66 20 | 74 75 70 6c 65 73 20 77 |ence of |tuples w|
|000046d0| 69 74 68 20 76 61 72 79 | 69 6e 67 20 74 79 70 65 |ith vary|ing type|
|000046e0| 73 0a 62 65 63 61 75 73 | 65 20 74 68 65 20 66 69 |s.becaus|e the fi|
|000046f0| 65 6c 64 20 63 61 6e 20 | 63 6f 6e 74 61 69 6e 20 |eld can |contain |
|00004700| 6d 6f 72 65 20 74 68 61 | 6e 20 6f 6e 65 20 72 65 |more tha|n one re|
|00004710| 74 72 69 65 76 65 20 63 | 6f 6d 6d 61 6e 64 20 61 |trieve c|ommand a|
|00004720| 6e 64 20 64 69 66 66 65 | 72 65 6e 74 20 63 6f 6d |nd diffe|rent com|
|00004730| 6d 61 6e 64 73 0a 63 61 | 6e 20 72 65 74 75 72 6e |mands.ca|n return|
|00004740| 20 64 69 66 66 65 72 65 | 6e 74 20 74 79 70 65 73 | differe|nt types|
|00004750| 20 6f 66 20 72 65 63 6f | 72 64 73 2e 0a 43 6f 6e | of reco|rds..Con|
|00004760| 73 65 71 75 65 6e 74 6c | 79 2c 20 74 68 65 20 70 |sequentl|y, the p|
|00004770| 72 6f 67 72 61 6d 6d 69 | 6e 67 20 6c 61 6e 67 75 |rogrammi|ng langu|
|00004780| 61 67 65 20 69 6e 74 65 | 72 66 61 63 65 20 6d 75 |age inte|rface mu|
|00004790| 73 74 20 70 72 6f 76 69 | 64 65 20 66 61 63 69 6c |st provi|de facil|
|000047a0| 69 74 69 65 73 20 74 6f | 20 64 65 74 65 72 6d 69 |ities to| determi|
|000047b0| 6e 65 0a 74 68 65 20 74 | 79 70 65 20 6f 66 20 74 |ne.the t|ype of t|
|000047c0| 68 65 20 72 65 74 75 72 | 6e 65 64 20 72 65 63 6f |he retur|ned reco|
|000047d0| 72 64 73 20 61 6e 64 20 | 74 6f 20 61 63 63 65 73 |rds and |to acces|
|000047e0| 73 20 74 68 65 20 66 69 | 65 6c 64 73 20 64 79 6e |s the fi|elds dyn|
|000047f0| 61 6d 69 63 61 6c 6c 79 | 2e 0a 2e 70 70 0a 46 69 |amically|...pp.Fi|
|00004800| 65 6c 64 73 20 6f 66 20 | 74 79 70 65 20 50 4f 53 |elds of |type POS|
|00004810| 54 51 55 45 4c 20 61 6e | 64 20 70 72 6f 63 65 64 |TQUEL an|d proced|
|00004820| 75 72 65 20 63 61 6e 20 | 62 65 20 75 73 65 64 20 |ure can |be used |
|00004830| 74 6f 20 72 65 70 72 65 | 73 65 6e 74 20 63 6f 6d |to repre|sent com|
|00004840| 70 6c 65 78 20 6f 62 6a | 65 63 74 73 0a 77 69 74 |plex obj|ects.wit|
|00004850| 68 20 73 68 61 72 65 64 | 20 73 75 62 6f 62 6a 65 |h shared| subobje|
|00004860| 63 74 73 20 61 6e 64 20 | 74 6f 20 73 75 70 70 6f |cts and |to suppo|
|00004870| 72 74 20 6d 75 6c 74 69 | 70 6c 65 20 72 65 70 72 |rt multi|ple repr|
|00004880| 65 73 65 6e 74 61 74 69 | 6f 6e 73 20 6f 66 20 64 |esentati|ons of d|
|00004890| 61 74 61 2e 0a 45 78 61 | 6d 70 6c 65 73 20 61 72 |ata..Exa|mples ar|
|000048a0| 65 20 67 69 76 65 6e 20 | 69 6e 20 74 68 65 20 6e |e given |in the n|
|000048b0| 65 78 74 20 73 65 63 74 | 69 6f 6e 20 6f 6e 20 63 |ext sect|ion on c|
|000048c0| 6f 6d 70 6c 65 78 20 6f | 62 6a 65 63 74 73 2e 0a |omplex o|bjects..|
|000048d0| 2e 70 70 0a 49 6e 20 61 | 64 64 69 74 69 6f 6e 20 |.pp.In a|ddition |
|000048e0| 74 6f 20 74 68 65 73 65 | 20 62 75 69 6c 74 2d 69 |to these| built-i|
|000048f0| 6e 20 64 61 74 61 20 74 | 79 70 65 73 2c 20 75 73 |n data t|ypes, us|
|00004900| 65 72 2d 64 65 66 69 6e | 65 64 20 64 61 74 61 20 |er-defin|ed data |
|00004910| 74 79 70 65 73 20 63 61 | 6e 20 62 65 20 64 65 66 |types ca|n be def|
|00004920| 69 6e 65 64 0a 75 73 69 | 6e 67 20 61 6e 20 69 6e |ined.usi|ng an in|
|00004930| 74 65 72 66 61 63 65 20 | 73 69 6d 69 6c 61 72 20 |terface |similar |
|00004940| 74 6f 20 74 68 65 20 6f | 6e 65 20 64 65 76 65 6c |to the o|ne devel|
|00004950| 6f 70 65 64 20 66 6f 72 | 20 41 44 54 2d 49 4e 47 |oped for| ADT-ING|
|00004960| 52 45 53 20 5b 53 54 4f | 4e 38 33 63 2c 20 53 54 |RES [STO|N83c, ST|
|00004970| 4f 4e 38 36 5d 2e 0a 4e | 65 77 20 64 61 74 61 20 |ON86]..N|ew data |
|00004980| 74 79 70 65 73 20 61 6e | 64 20 6f 70 65 72 61 74 |types an|d operat|
|00004990| 6f 72 73 20 63 61 6e 20 | 62 65 20 64 65 66 69 6e |ors can |be defin|
|000049a0| 65 64 20 77 69 74 68 20 | 74 68 65 20 0a 75 73 65 |ed with |the .use|
|000049b0| 72 2d 64 65 66 69 6e 65 | 64 20 64 61 74 61 20 74 |r-define|d data t|
|000049c0| 79 70 65 20 66 61 63 69 | 6c 69 74 79 2e 0a 2e 73 |ype faci|lity...s|
|000049d0| 68 20 32 20 22 43 6f 6d | 70 6c 65 78 20 4f 62 6a |h 2 "Com|plex Obj|
|000049e0| 65 63 74 73 22 0a 2e 70 | 70 0a 54 68 69 73 20 73 |ects"..p|p.This s|
|000049f0| 65 63 74 69 6f 6e 20 64 | 65 73 63 72 69 62 65 73 |ection d|escribes|
|00004a00| 20 68 6f 77 20 66 69 65 | 6c 64 73 20 6f 66 20 74 | how fie|lds of t|
|00004a10| 79 70 65 20 50 4f 53 54 | 51 55 45 4c 20 61 6e 64 |ype POST|QUEL and|
|00004a20| 20 70 72 6f 63 65 64 75 | 72 65 20 63 61 6e 20 62 | procedu|re can b|
|00004a30| 65 0a 75 73 65 64 20 74 | 6f 20 72 65 70 72 65 73 |e.used t|o repres|
|00004a40| 65 6e 74 20 73 68 61 72 | 65 64 20 63 6f 6d 70 6c |ent shar|ed compl|
|00004a50| 65 78 20 6f 62 6a 65 63 | 74 73 20 61 6e 64 20 74 |ex objec|ts and t|
|00004a60| 6f 20 73 75 70 70 6f 72 | 74 20 6d 75 6c 74 69 70 |o suppor|t multip|
|00004a70| 6c 65 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |le repre|sentatio|
|00004a80| 6e 73 20 6f 66 0a 64 61 | 74 61 2e 0a 2e 70 70 0a |ns of.da|ta...pp.|
|00004a90| 53 68 61 72 65 64 20 63 | 6f 6d 70 6c 65 78 20 6f |Shared c|omplex o|
|00004aa0| 62 6a 65 63 74 73 20 63 | 61 6e 20 62 65 20 72 65 |bjects c|an be re|
|00004ab0| 70 72 65 73 65 6e 74 65 | 64 20 62 79 20 61 20 66 |presente|d by a f|
|00004ac0| 69 65 6c 64 20 6f 66 20 | 74 79 70 65 20 50 4f 53 |ield of |type POS|
|00004ad0| 54 51 55 45 4c 20 74 68 | 61 74 20 63 6f 6e 74 61 |TQUEL th|at conta|
|00004ae0| 69 6e 73 0a 61 20 73 65 | 71 75 65 6e 63 65 20 6f |ins.a se|quence o|
|00004af0| 66 20 63 6f 6d 6d 61 6e | 64 73 20 74 6f 20 72 65 |f comman|ds to re|
|00004b00| 74 72 69 65 76 65 20 64 | 61 74 61 20 66 72 6f 6d |trieve d|ata from|
|00004b10| 20 6f 74 68 65 72 20 72 | 65 6c 61 74 69 6f 6e 73 | other r|elations|
|00004b20| 20 74 68 61 74 20 72 65 | 70 72 65 73 65 6e 74 20 | that re|present |
|00004b30| 74 68 65 0a 73 75 62 6f | 62 6a 65 63 74 73 2e 0a |the.subo|bjects..|
|00004b40| 46 6f 72 20 65 78 61 6d | 70 6c 65 2c 20 67 69 76 |For exam|ple, giv|
|00004b50| 65 6e 20 74 68 65 20 72 | 65 6c 61 74 69 6f 6e 73 |en the r|elations|
|00004b60| 20 50 4f 4c 59 47 4f 4e | 2c 20 43 49 52 43 4c 45 | POLYGON|, CIRCLE|
|00004b70| 2c 20 61 6e 64 20 4c 49 | 4e 45 20 64 65 66 69 6e |, and LI|NE defin|
|00004b80| 65 64 20 61 62 6f 76 65 | 2c 20 61 6e 0a 6f 62 6a |ed above|, an.obj|
|00004b90| 65 63 74 20 72 65 6c 61 | 74 69 6f 6e 20 63 61 6e |ect rela|tion can|
|00004ba0| 20 62 65 20 64 65 66 69 | 6e 65 64 20 74 68 61 74 | be defi|ned that|
|00004bb0| 20 72 65 70 72 65 73 65 | 6e 74 73 20 63 6f 6d 70 | represe|nts comp|
|00004bc0| 6c 65 78 20 6f 62 6a 65 | 63 74 73 20 63 6f 6d 70 |lex obje|cts comp|
|00004bd0| 6f 73 65 64 20 6f 66 0a | 70 6f 6c 79 67 6f 6e 73 |osed of.|polygons|
|00004be0| 2c 20 63 69 72 63 6c 65 | 73 2c 20 61 6e 64 20 6c |, circle|s, and l|
|00004bf0| 69 6e 65 73 2e 0a 54 68 | 65 20 64 65 66 69 6e 69 |ines..Th|e defini|
|00004c00| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 6f 62 6a 65 |tion of |the obje|
|00004c10| 63 74 20 72 65 6c 61 74 | 69 6f 6e 20 77 6f 75 6c |ct relat|ion woul|
|00004c20| 64 20 62 65 3a 0a 2e 28 | 62 0a 63 72 65 61 74 65 |d be:..(|b.create|
|00004c30| 20 4f 42 4a 45 43 54 20 | 28 6e 61 6d 65 20 3d 20 | OBJECT |(name = |
|00004c40| 63 68 61 72 5b 31 30 5d | 2c 20 6f 62 6a 20 3d 20 |char[10]|, obj = |
|00004c50| 70 6f 73 74 71 75 65 6c | 29 0a 2e 29 62 0a 54 68 |postquel|)..)b.Th|
|00004c60| 65 20 74 61 62 6c 65 20 | 69 6e 20 66 69 67 75 72 |e table |in figur|
|00004c70| 65 20 31 20 73 68 6f 77 | 73 20 73 61 6d 70 6c 65 |e 1 show|s sample|
|00004c80| 20 76 61 6c 75 65 73 20 | 66 6f 72 20 74 68 69 73 | values |for this|
|00004c90| 20 72 65 6c 61 74 69 6f | 6e 2e 0a 2e 28 7a 0a 2e | relatio|n...(z..|
|00004ca0| 68 6c 0a 2e 54 53 0a 63 | 65 6e 74 65 72 3b 0a 6c |hl..TS.c|enter;.l|
|00004cb0| 20 7c 20 6c 2e 0a 5c 66 | 42 4e 61 6d 65 09 4f 42 | | l..\f|BName.OB|
|00004cc0| 4a 5c 66 50 0a 5f 0a 61 | 70 70 6c 65 09 54 7b 0a |J\fP._.a|pple.T{.|
|00004cd0| 2e 6e 66 0a 72 65 74 72 | 69 65 76 65 20 28 50 4f |.nf.retr|ieve (PO|
|00004ce0| 4c 59 47 4f 4e 2e 61 6c | 6c 29 0a 77 68 65 72 65 |LYGON.al|l).where|
|00004cf0| 20 50 4f 4c 59 47 4f 4e | 2e 69 64 20 3d 20 31 30 | POLYGON|.id = 10|
|00004d00| 0a 72 65 74 72 69 65 76 | 65 20 28 43 49 52 43 4c |.retriev|e (CIRCL|
|00004d10| 45 2e 61 6c 6c 29 0a 77 | 68 65 72 65 20 43 49 52 |E.all).w|here CIR|
|00004d20| 43 4c 45 2e 69 64 20 3d | 20 34 30 0a 54 7d 0a 5f |CLE.id =| 40.T}._|
|00004d30| 0a 6f 72 61 6e 67 65 09 | 54 7b 0a 2e 6e 66 0a 72 |.orange.|T{..nf.r|
|00004d40| 65 74 72 69 65 76 65 20 | 28 4c 49 4e 45 2e 61 6c |etrieve |(LINE.al|
|00004d50| 6c 29 0a 77 68 65 72 65 | 20 4c 49 4e 45 2e 69 64 |l).where| LINE.id|
|00004d60| 20 3d 20 31 37 0a 72 65 | 74 72 69 65 76 65 20 28 | = 17.re|trieve (|
|00004d70| 50 4f 4c 59 47 4f 4e 2e | 61 6c 6c 29 0a 77 68 65 |POLYGON.|all).whe|
|00004d80| 72 65 20 50 4f 4c 59 47 | 4f 4e 2e 69 64 20 3d 20 |re POLYG|ON.id = |
|00004d90| 31 30 0a 54 7d 0a 2e 54 | 45 0a 2e 73 70 0a 2e 63 |10.T}..T|E..sp..c|
|00004da0| 65 0a 46 69 67 75 72 65 | 20 31 2e 20 45 78 61 6d |e.Figure| 1. Exam|
|00004db0| 70 6c 65 20 6f 66 20 61 | 6e 20 4f 42 4a 45 43 54 |ple of a|n OBJECT|
|00004dc0| 20 72 65 6c 61 74 69 6f | 6e 2e 0a 2e 68 6c 0a 2e | relatio|n...hl..|
|00004dd0| 29 7a 0a 54 68 65 20 72 | 65 6c 61 74 69 6f 6e 20 |)z.The r|elation |
|00004de0| 63 6f 6e 74 61 69 6e 73 | 20 74 68 65 20 64 65 73 |contains| the des|
|00004df0| 63 72 69 70 74 69 6f 6e | 20 6f 66 20 74 77 6f 20 |cription| of two |
|00004e00| 63 6f 6d 70 6c 65 78 20 | 6f 62 6a 65 63 74 73 20 |complex |objects |
|00004e10| 6e 61 6d 65 64 20 60 60 | 61 70 70 6c 65 27 27 0a |named ``|apple''.|
|00004e20| 61 6e 64 20 60 60 6f 72 | 61 6e 67 65 2e 27 27 0a |and ``or|ange.''.|
|00004e30| 54 68 65 20 6f 62 6a 65 | 63 74 20 60 60 61 70 70 |The obje|ct ``app|
|00004e40| 6c 65 27 27 20 69 73 20 | 63 6f 6d 70 6f 73 65 64 |le'' is |composed|
|00004e50| 20 6f 66 20 61 20 70 6f | 6c 79 67 6f 6e 20 61 6e | of a po|lygon an|
|00004e60| 64 20 61 20 63 69 72 63 | 6c 65 20 61 6e 64 20 74 |d a circ|le and t|
|00004e70| 68 65 20 6f 62 6a 65 63 | 74 20 60 60 6f 72 61 6e |he objec|t ``oran|
|00004e80| 67 65 27 27 0a 69 73 20 | 63 6f 6d 70 6f 73 65 64 |ge''.is |composed|
|00004e90| 20 6f 66 20 61 20 6c 69 | 6e 65 20 61 6e 64 20 61 | of a li|ne and a|
|00004ea0| 20 70 6f 6c 79 67 6f 6e | 2e 0a 4e 6f 74 69 63 65 | polygon|..Notice|
|00004eb0| 20 74 68 61 74 20 62 6f | 74 68 20 6f 62 6a 65 63 | that bo|th objec|
|00004ec0| 74 73 20 73 68 61 72 65 | 20 74 68 65 20 70 6f 6c |ts share| the pol|
|00004ed0| 79 67 6f 6e 20 77 69 74 | 68 20 69 64 20 65 71 75 |ygon wit|h id equ|
|00004ee0| 61 6c 20 74 6f 20 31 30 | 2e 0a 2e 70 70 0a 4d 75 |al to 10|...pp.Mu|
|00004ef0| 6c 74 69 70 6c 65 20 72 | 65 70 72 65 73 65 6e 74 |ltiple r|epresent|
|00004f00| 61 74 69 6f 6e 73 20 6f | 66 20 64 61 74 61 20 61 |ations o|f data a|
|00004f10| 72 65 20 75 73 65 66 75 | 6c 20 66 6f 72 20 63 61 |re usefu|l for ca|
|00004f20| 63 68 69 6e 67 20 64 61 | 74 61 20 69 6e 20 61 20 |ching da|ta in a |
|00004f30| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 0a 74 |data str|ucture.t|
|00004f40| 68 61 74 20 69 73 20 62 | 65 74 74 65 72 20 73 75 |hat is b|etter su|
|00004f50| 69 74 65 64 20 74 6f 20 | 61 20 70 61 72 74 69 63 |ited to |a partic|
|00004f60| 75 6c 61 72 20 75 73 65 | 20 77 68 69 6c 65 20 73 |ular use| while s|
|00004f70| 74 69 6c 6c 20 72 65 74 | 61 69 6e 69 6e 67 20 74 |till ret|aining t|
|00004f80| 68 65 20 65 61 73 65 0a | 6f 66 20 61 63 63 65 73 |he ease.|of acces|
|00004f90| 73 20 76 69 61 20 61 20 | 72 65 6c 61 74 69 6f 6e |s via a |relation|
|00004fa0| 61 6c 20 72 65 70 72 65 | 73 65 6e 74 61 74 69 6f |al repre|sentatio|
|00004fb0| 6e 2e 0a 4d 61 6e 79 20 | 65 78 61 6d 70 6c 65 73 |n..Many |examples|
|00004fc0| 20 6f 66 20 74 68 69 73 | 20 75 73 65 20 61 72 65 | of this| use are|
|00004fd0| 20 66 6f 75 6e 64 20 69 | 6e 20 64 61 74 61 62 61 | found i|n databa|
|00004fe0| 73 65 20 73 79 73 74 65 | 6d 73 20 28 65 2e 67 2e |se syste|ms (e.g.|
|00004ff0| 2c 20 6d 61 69 6e 20 6d | 65 6d 6f 72 79 20 72 65 |, main m|emory re|
|00005000| 6c 61 74 69 6f 6e 0a 64 | 65 73 63 72 69 70 74 6f |lation.d|escripto|
|00005010| 72 73 29 20 61 6e 64 20 | 66 6f 72 6d 73 20 73 79 |rs) and |forms sy|
|00005020| 73 74 65 6d 73 20 5b 52 | 4f 57 45 38 35 5d 2e 0a |stems [R|OWE85]..|
|00005030| 4d 75 6c 74 69 70 6c 65 | 20 72 65 70 72 65 73 65 |Multiple| represe|
|00005040| 6e 74 61 74 69 6f 6e 73 | 20 63 61 6e 20 62 65 20 |ntations| can be |
|00005050| 73 75 70 70 6f 72 74 65 | 64 20 62 79 20 64 65 66 |supporte|d by def|
|00005060| 69 6e 69 6e 67 20 61 20 | 70 72 6f 63 65 64 75 72 |ining a |procedur|
|00005070| 65 0a 74 68 61 74 20 74 | 72 61 6e 73 6c 61 74 65 |e.that t|ranslate|
|00005080| 73 20 6f 6e 65 20 72 65 | 70 72 65 73 65 6e 74 61 |s one re|presenta|
|00005090| 74 69 6f 6e 20 28 65 2e | 67 2e 2c 20 61 20 72 65 |tion (e.|g., a re|
|000050a0| 6c 61 74 69 6f 6e 61 6c | 20 72 65 70 72 65 73 65 |lational| represe|
|000050b0| 6e 74 61 74 69 6f 6e 29 | 0a 74 6f 20 61 6e 6f 74 |ntation)|.to anot|
|000050c0| 68 65 72 20 72 65 70 72 | 65 73 65 6e 74 61 74 69 |her repr|esentati|
|000050d0| 6f 6e 20 28 65 2e 67 2e | 2c 20 61 20 64 69 73 70 |on (e.g.|, a disp|
|000050e0| 6c 61 79 20 6c 69 73 74 | 20 73 75 69 74 61 62 6c |lay list| suitabl|
|000050f0| 65 20 66 6f 72 20 61 20 | 67 72 61 70 68 69 63 73 |e for a |graphics|
|00005100| 20 64 69 73 70 6c 61 79 | 29 2e 0a 54 68 65 20 74 | display|)..The t|
|00005110| 72 61 6e 73 6c 61 74 69 | 6f 6e 20 70 72 6f 63 65 |ranslati|on proce|
|00005120| 64 75 72 65 20 69 73 20 | 73 74 6f 72 65 64 20 69 |dure is |stored i|
|00005130| 6e 20 74 68 65 20 64 61 | 74 61 62 61 73 65 2e 0a |n the da|tabase..|
|00005140| 43 6f 6e 74 69 6e 75 69 | 6e 67 20 77 69 74 68 20 |Continui|ng with |
|00005150| 6f 75 72 20 63 6f 6d 70 | 6c 65 78 20 6f 62 6a 65 |our comp|lex obje|
|00005160| 63 74 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |ct examp|le, the |
|00005170| 4f 42 4a 45 43 54 20 72 | 65 6c 61 74 69 6f 6e 20 |OBJECT r|elation |
|00005180| 77 6f 75 6c 64 0a 68 61 | 76 65 20 61 6e 20 61 64 |would.ha|ve an ad|
|00005190| 64 69 74 69 6f 6e 61 6c | 20 66 69 65 6c 64 2c 20 |ditional| field, |
|000051a0| 6e 61 6d 65 64 20 60 60 | 64 69 73 70 6c 61 79 2c |named ``|display,|
|000051b0| 27 27 20 74 68 61 74 20 | 77 6f 75 6c 64 20 63 6f |'' that |would co|
|000051c0| 6e 74 61 69 6e 20 61 20 | 70 72 6f 63 65 64 75 72 |ntain a |procedur|
|000051d0| 65 20 74 68 61 74 0a 63 | 72 65 61 74 65 73 20 61 |e that.c|reates a|
|000051e0| 20 64 69 73 70 6c 61 79 | 20 6c 69 73 74 20 66 6f | display| list fo|
|000051f0| 72 20 61 6e 20 6f 62 6a | 65 63 74 20 73 74 6f 72 |r an obj|ect stor|
|00005200| 65 64 20 69 6e 20 50 4f | 4c 59 47 4f 4e 2c 20 43 |ed in PO|LYGON, C|
|00005210| 49 52 43 4c 45 2c 20 61 | 6e 64 20 4c 49 4e 45 3a |IRCLE, a|nd LINE:|
|00005220| 0a 2e 28 62 0a 63 72 65 | 61 74 65 20 4f 42 4a 45 |..(b.cre|ate OBJE|
|00005230| 43 54 28 6e 61 6d 65 3d | 63 68 61 72 5b 31 30 5d |CT(name=|char[10]|
|00005240| 2c 20 6f 62 6a 3d 70 6f | 73 74 71 75 65 6c 2c 20 |, obj=po|stquel, |
|00005250| 64 69 73 70 6c 61 79 3d | 63 70 72 6f 63 29 0a 2e |display=|cproc)..|
|00005260| 29 62 0a 54 68 65 20 76 | 61 6c 75 65 20 73 74 6f |)b.The v|alue sto|
|00005270| 72 65 64 20 69 6e 20 74 | 68 65 20 64 69 73 70 6c |red in t|he displ|
|00005280| 61 79 20 66 69 65 6c 64 | 20 69 73 20 61 20 70 72 |ay field| is a pr|
|00005290| 6f 63 65 64 75 72 65 20 | 77 72 69 74 74 65 6e 20 |ocedure |written |
|000052a0| 69 6e 20 43 0a 74 68 61 | 74 20 71 75 65 72 69 65 |in C.tha|t querie|
|000052b0| 73 20 74 68 65 20 64 61 | 74 61 62 61 73 65 20 74 |s the da|tabase t|
|000052c0| 6f 20 66 65 74 63 68 20 | 74 68 65 20 73 75 62 6f |o fetch |the subo|
|000052d0| 62 6a 65 63 74 73 20 74 | 68 61 74 20 6d 61 6b 65 |bjects t|hat make|
|000052e0| 20 75 70 20 74 68 65 20 | 6f 62 6a 65 63 74 0a 61 | up the |object.a|
|000052f0| 6e 64 20 74 68 61 74 20 | 63 72 65 61 74 65 73 20 |nd that |creates |
|00005300| 74 68 65 20 64 69 73 70 | 6c 61 79 20 6c 69 73 74 |the disp|lay list|
|00005310| 20 72 65 70 72 65 73 65 | 6e 74 61 74 69 6f 6e 20 | represe|ntation |
|00005320| 66 6f 72 20 74 68 65 20 | 6f 62 6a 65 63 74 2e 0a |for the |object..|
|00005330| 2e 70 70 0a 54 68 69 73 | 20 73 6f 6c 75 74 69 6f |.pp.This| solutio|
|00005340| 6e 20 68 61 73 20 74 77 | 6f 20 70 72 6f 62 6c 65 |n has tw|o proble|
|00005350| 6d 73 3a 0a 74 68 65 20 | 63 6f 64 65 20 69 73 20 |ms:.the |code is |
|00005360| 72 65 70 65 61 74 65 64 | 20 69 6e 20 65 76 65 72 |repeated| in ever|
|00005370| 79 20 4f 42 4a 45 43 54 | 20 74 75 70 6c 65 20 61 |y OBJECT| tuple a|
|00005380| 6e 64 0a 74 68 65 20 43 | 20 70 72 6f 63 65 64 75 |nd.the C| procedu|
|00005390| 72 65 20 72 65 70 6c 69 | 63 61 74 65 73 20 74 68 |re repli|cates th|
|000053a0| 65 20 71 75 65 72 69 65 | 73 20 73 74 6f 72 65 64 |e querie|s stored|
|000053b0| 20 69 6e 20 74 68 65 0a | 6f 62 6a 65 63 74 20 66 | in the.|object f|
|000053c0| 69 65 6c 64 20 74 6f 20 | 72 65 74 72 69 65 76 65 |ield to |retrieve|
|000053d0| 20 74 68 65 20 73 75 62 | 6f 62 6a 65 63 74 73 2e | the sub|objects.|
|000053e0| 0a 54 68 65 73 65 20 70 | 72 6f 62 6c 65 6d 73 20 |.These p|roblems |
|000053f0| 63 61 6e 20 62 65 20 73 | 6f 6c 76 65 64 20 62 79 |can be s|olved by|
|00005400| 20 73 74 6f 72 69 6e 67 | 20 74 68 65 20 70 72 6f | storing| the pro|
|00005410| 63 65 64 75 72 65 20 69 | 6e 20 61 20 73 65 70 61 |cedure i|n a sepa|
|00005420| 72 61 74 65 0a 72 65 6c | 61 74 69 6f 6e 20 28 69 |rate.rel|ation (i|
|00005430| 2e 65 2e 2c 20 6e 6f 72 | 6d 61 6c 69 7a 69 6e 67 |.e., nor|malizing|
|00005440| 20 74 68 65 20 64 61 74 | 61 62 61 73 65 20 64 65 | the dat|abase de|
|00005450| 73 69 67 6e 29 20 61 6e | 64 20 62 79 0a 70 61 73 |sign) an|d by.pas|
|00005460| 73 69 6e 67 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |sing the| object |
|00005470| 74 6f 20 74 68 65 20 70 | 72 6f 63 65 64 75 72 65 |to the p|rocedure|
|00005480| 20 61 73 20 61 6e 20 61 | 72 67 75 6d 65 6e 74 2e | as an a|rgument.|
|00005490| 0a 54 68 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 |.The def|inition |
|000054a0| 6f 66 20 74 68 65 20 72 | 65 6c 61 74 69 6f 6e 20 |of the r|elation |
|000054b0| 69 6e 20 77 68 69 63 68 | 20 74 68 65 20 70 72 6f |in which| the pro|
|000054c0| 63 65 64 75 72 65 73 20 | 77 69 6c 6c 20 62 65 0a |cedures |will be.|
|000054d0| 73 74 6f 72 65 64 20 69 | 73 3a 0a 2e 28 62 0a 63 |stored i|s:..(b.c|
|000054e0| 72 65 61 74 65 20 4f 42 | 4a 50 52 4f 43 28 6e 61 |reate OB|JPROC(na|
|000054f0| 6d 65 3d 63 68 61 72 5b | 31 32 5d 2c 20 70 72 6f |me=char[|12], pro|
|00005500| 63 3d 63 70 72 6f 63 29 | 0a 61 70 70 65 6e 64 20 |c=cproc)|.append |
|00005510| 74 6f 20 4f 42 4a 50 52 | 4f 43 28 6e 61 6d 65 3d |to OBJPR|OC(name=|
|00005520| 60 60 64 69 73 70 6c 61 | 79 2d 6c 69 73 74 27 27 |``displa|y-list''|
|00005530| 2c 20 70 72 6f 63 3d 60 | 60 2e 2e 2e 73 6f 75 72 |, proc=`|`...sour|
|00005540| 63 65 20 63 6f 64 65 2e | 2e 2e 27 27 29 0a 2e 29 |ce code.|..'')..)|
|00005550| 62 0a 4e 6f 77 2c 20 74 | 68 65 20 65 6e 74 72 79 |b.Now, t|he entry|
|00005560| 20 69 6e 20 74 68 65 20 | 64 69 73 70 6c 61 79 20 | in the |display |
|00005570| 66 69 65 6c 64 20 66 6f | 72 20 74 68 65 20 60 60 |field fo|r the ``|
|00005580| 61 70 70 6c 65 27 27 20 | 6f 62 6a 65 63 74 20 69 |apple'' |object i|
|00005590| 73 0a 2e 28 62 0a 65 78 | 65 63 75 74 65 20 28 4f |s..(b.ex|ecute (O|
|000055a0| 42 4a 50 52 4f 43 2e 70 | 72 6f 63 29 0a 77 69 74 |BJPROC.p|roc).wit|
|000055b0| 68 20 28 60 60 61 70 70 | 6c 65 27 27 29 0a 77 68 |h (``app|le'').wh|
|000055c0| 65 72 65 20 4f 42 4a 50 | 52 4f 43 2e 6e 61 6d 65 |ere OBJP|ROC.name|
|000055d0| 3d 60 60 64 69 73 70 6c | 61 79 2d 6c 69 73 74 27 |=``displ|ay-list'|
|000055e0| 27 0a 2e 29 62 0a 54 68 | 69 73 20 63 6f 6d 6d 61 |'..)b.Th|is comma|
|000055f0| 6e 64 20 65 78 65 63 75 | 74 65 73 20 74 68 65 20 |nd execu|tes the |
|00005600| 70 72 6f 63 65 64 75 72 | 65 20 74 6f 20 63 72 65 |procedur|e to cre|
|00005610| 61 74 65 20 74 68 65 20 | 61 6c 74 65 72 6e 61 74 |ate the |alternat|
|00005620| 69 76 65 20 72 65 70 72 | 65 73 65 6e 74 61 74 69 |ive repr|esentati|
|00005630| 6f 6e 0a 61 6e 64 20 70 | 61 73 73 65 73 20 74 6f |on.and p|asses to|
|00005640| 20 69 74 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 | it the |name of |
|00005650| 74 68 65 20 6f 62 6a 65 | 63 74 2e 0a 4e 6f 74 69 |the obje|ct..Noti|
|00005660| 63 65 20 74 68 61 74 20 | 74 68 65 20 60 60 64 69 |ce that |the ``di|
|00005670| 73 70 6c 61 79 27 27 20 | 66 69 65 6c 64 20 63 61 |splay'' |field ca|
|00005680| 6e 20 62 65 20 63 68 61 | 6e 67 65 64 20 74 6f 20 |n be cha|nged to |
|00005690| 61 20 76 61 6c 75 65 20 | 6f 66 20 74 79 70 65 20 |a value |of type |
|000056a0| 50 4f 53 54 51 55 45 4c | 0a 62 65 63 61 75 73 65 |POSTQUEL|.because|
|000056b0| 20 77 65 20 61 72 65 20 | 6e 6f 74 20 73 74 6f 72 | we are |not stor|
|000056c0| 69 6e 67 20 74 68 65 20 | 70 72 6f 63 65 64 75 72 |ing the |procedur|
|000056d0| 65 20 69 6e 20 4f 42 4a | 45 43 54 2c 20 6f 6e 6c |e in OBJ|ECT, onl|
|000056e0| 79 20 61 20 63 6f 6d 6d | 61 6e 64 20 74 6f 0a 65 |y a comm|and to.e|
|000056f0| 78 65 63 75 74 65 20 74 | 68 65 20 70 72 6f 63 65 |xecute t|he proce|
|00005700| 64 75 72 65 2e 0a 41 74 | 20 74 68 69 73 20 70 6f |dure..At| this po|
|00005710| 69 6e 74 2c 20 74 68 65 | 20 70 72 6f 63 65 64 75 |int, the| procedu|
|00005720| 72 65 20 63 61 6e 20 65 | 78 65 63 75 74 65 20 61 |re can e|xecute a|
|00005730| 20 63 6f 6d 6d 61 6e 64 | 20 74 6f 20 66 65 74 63 | command| to fetc|
|00005740| 68 20 74 68 65 20 64 61 | 74 61 2e 0a 42 65 63 61 |h the da|ta..Beca|
|00005750| 75 73 65 20 74 68 65 20 | 70 72 6f 63 65 64 75 72 |use the |procedur|
|00005760| 65 20 77 61 73 20 70 61 | 73 73 65 64 20 74 68 65 |e was pa|ssed the|
|00005770| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 6f 62 6a | name of| the obj|
|00005780| 65 63 74 20 69 74 20 63 | 61 6e 20 65 78 65 63 75 |ect it c|an execu|
|00005790| 74 65 0a 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |te.the f|ollowing|
|000057a0| 20 63 6f 6d 6d 61 6e 64 | 20 74 6f 20 66 65 74 63 | command| to fetc|
|000057b0| 68 20 69 74 73 20 76 61 | 6c 75 65 3a 0a 2e 28 62 |h its va|lue:..(b|
|000057c0| 0a 65 78 65 63 75 74 65 | 20 28 4f 42 4a 45 43 54 |.execute| (OBJECT|
|000057d0| 2e 6f 62 6a 29 0a 77 68 | 65 72 65 20 4f 42 4a 45 |.obj).wh|ere OBJE|
|000057e0| 43 54 2e 6e 61 6d 65 3d | 5c 66 49 61 72 67 75 6d |CT.name=|\fIargum|
|000057f0| 65 6e 74 5c 66 50 0a 2e | 29 62 0a 54 68 69 73 20 |ent\fP..|)b.This |
|00005800| 73 6f 6c 75 74 69 6f 6e | 20 69 73 20 73 6f 6d 65 |solution| is some|
|00005810| 77 68 61 74 20 63 6f 6d | 70 6c 65 78 20 62 75 74 |what com|plex but|
|00005820| 20 69 74 20 73 74 6f 72 | 65 73 20 6f 6e 6c 79 20 | it stor|es only |
|00005830| 6f 6e 65 20 63 6f 70 79 | 20 6f 66 20 74 68 65 20 |one copy| of the |
|00005840| 70 72 6f 63 65 64 75 72 | 65 27 73 0a 73 6f 75 72 |procedur|e's.sour|
|00005850| 63 65 20 63 6f 64 65 20 | 69 6e 20 74 68 65 20 64 |ce code |in the d|
|00005860| 61 74 61 62 61 73 65 20 | 61 6e 64 20 69 74 20 73 |atabase |and it s|
|00005870| 74 6f 72 65 73 20 6f 6e | 6c 79 20 6f 6e 65 20 63 |tores on|ly one c|
|00005880| 6f 70 79 20 6f 66 0a 74 | 68 65 20 63 6f 6d 6d 61 |opy of.t|he comma|
|00005890| 6e 64 73 20 74 6f 20 66 | 65 74 63 68 20 74 68 65 |nds to f|etch the|
|000058a0| 20 64 61 74 61 20 74 68 | 61 74 20 72 65 70 72 65 | data th|at repre|
|000058b0| 73 65 6e 74 73 20 74 68 | 65 20 6f 62 6a 65 63 74 |sents th|e object|
|000058c0| 2e 0a 2e 70 70 0a 46 69 | 65 6c 64 73 20 6f 66 20 |...pp.Fi|elds of |
|000058d0| 74 79 70 65 20 50 4f 53 | 54 51 55 45 4c 20 61 6e |type POS|TQUEL an|
|000058e0| 64 20 70 72 6f 63 65 64 | 75 72 65 20 63 61 6e 20 |d proced|ure can |
|000058f0| 62 65 20 65 66 66 69 63 | 69 65 6e 74 6c 79 20 73 |be effic|iently s|
|00005900| 75 70 70 6f 72 74 65 64 | 20 74 68 72 6f 75 67 68 |upported| through|
|00005910| 20 61 0a 63 6f 6d 62 69 | 6e 61 74 69 6f 6e 20 6f | a.combi|nation o|
|00005920| 66 20 63 6f 6d 70 69 6c | 61 74 69 6f 6e 20 61 6e |f compil|ation an|
|00005930| 64 20 70 72 65 63 6f 6d | 70 75 74 61 74 69 6f 6e |d precom|putation|
|00005940| 20 64 65 73 63 72 69 62 | 65 64 20 69 6e 20 73 65 | describ|ed in se|
|00005950| 63 74 69 6f 6e 73 20 34 | 20 61 6e 64 20 35 2e 0a |ctions 4| and 5..|
|00005960| 2e 73 68 20 32 20 22 54 | 69 6d 65 20 56 61 72 79 |.sh 2 "T|ime Vary|
|00005970| 69 6e 67 20 44 61 74 61 | 22 0a 2e 70 70 0a 50 4f |ing Data|"..pp.PO|
|00005980| 53 54 51 55 45 4c 20 61 | 6c 6c 6f 77 73 20 75 73 |STQUEL a|llows us|
|00005990| 65 72 73 20 74 6f 20 73 | 61 76 65 20 61 6e 64 20 |ers to s|ave and |
|000059a0| 71 75 65 72 79 20 68 69 | 73 74 6f 72 69 63 61 6c |query hi|storical|
|000059b0| 20 64 61 74 61 20 61 6e | 64 20 76 65 72 73 69 6f | data an|d versio|
|000059c0| 6e 73 20 5b 4b 41 54 5a | 38 35 2c 20 57 4f 4f 44 |ns [KATZ|85, WOOD|
|000059d0| 38 33 5d 2e 0a 42 79 20 | 64 65 66 61 75 6c 74 2c |83]..By |default,|
|000059e0| 20 64 61 74 61 20 69 6e | 20 61 20 72 65 6c 61 74 | data in| a relat|
|000059f0| 69 6f 6e 20 69 73 20 6e | 65 76 65 72 20 64 65 6c |ion is n|ever del|
|00005a00| 65 74 65 64 20 6f 72 20 | 75 70 64 61 74 65 64 2e |eted or |updated.|
|00005a10| 0a 43 6f 6e 76 65 6e 74 | 69 6f 6e 61 6c 20 72 65 |.Convent|ional re|
|00005a20| 74 72 69 65 76 61 6c 73 | 20 61 6c 77 61 79 73 20 |trievals| always |
|00005a30| 61 63 63 65 73 73 20 74 | 68 65 20 63 75 72 72 65 |access t|he curre|
|00005a40| 6e 74 20 74 75 70 6c 65 | 73 20 69 6e 20 74 68 65 |nt tuple|s in the|
|00005a50| 20 72 65 6c 61 74 69 6f | 6e 2e 0a 48 69 73 74 6f | relatio|n..Histo|
|00005a60| 72 69 63 61 6c 20 64 61 | 74 61 20 63 61 6e 20 62 |rical da|ta can b|
|00005a70| 65 20 61 63 63 65 73 73 | 65 64 20 62 79 20 69 6e |e access|ed by in|
|00005a80| 64 69 63 61 74 69 6e 67 | 20 74 68 65 20 64 65 73 |dicating| the des|
|00005a90| 69 72 65 64 20 74 69 6d | 65 20 77 68 65 6e 20 64 |ired tim|e when d|
|00005aa0| 65 66 69 6e 69 6e 67 20 | 61 20 0a 74 75 70 6c 65 |efining |a .tuple|
|00005ab0| 20 76 61 72 69 61 62 6c | 65 2e 0a 46 6f 72 20 65 | variabl|e..For e|
|00005ac0| 78 61 6d 70 6c 65 2c 20 | 74 6f 20 61 63 63 65 73 |xample, |to acces|
|00005ad0| 73 20 68 69 73 74 6f 72 | 69 63 61 6c 20 65 6d 70 |s histor|ical emp|
|00005ae0| 6c 6f 79 65 65 20 64 61 | 74 61 20 61 20 75 73 65 |loyee da|ta a use|
|00005af0| 72 20 77 72 69 74 65 73 | 0a 2e 28 62 0a 72 65 74 |r writes|..(b.ret|
|00005b00| 72 69 65 76 65 20 28 45 | 2e 61 6c 6c 29 0a 66 72 |rieve (E|.all).fr|
|00005b10| 6f 6d 20 45 20 69 6e 20 | 45 4d 50 5b 60 60 37 20 |om E in |EMP[``7 |
|00005b20| 4a 61 6e 75 61 72 79 20 | 31 39 38 35 27 27 5d 0a |January |1985''].|
|00005b30| 2e 29 62 0a 77 68 69 63 | 68 20 72 65 74 72 69 65 |.)b.whic|h retrie|
|00005b40| 76 65 73 20 61 6c 6c 20 | 72 65 63 6f 72 64 73 20 |ves all |records |
|00005b50| 66 6f 72 20 65 6d 70 6c | 6f 79 65 65 73 20 74 68 |for empl|oyees th|
|00005b60| 61 74 20 77 6f 72 6b 65 | 64 20 66 6f 72 20 74 68 |at worke|d for th|
|00005b70| 65 20 63 6f 6d 70 61 6e | 79 20 6f 6e 20 37 20 4a |e compan|y on 7 J|
|00005b80| 61 6e 75 61 72 79 20 31 | 39 38 35 2e 0a 54 68 65 |anuary 1|985..The|
|00005b90| 20 46 72 6f 6d 2d 63 6c | 61 75 73 65 20 77 68 69 | From-cl|ause whi|
|00005ba0| 63 68 20 69 73 20 73 69 | 6d 69 6c 61 72 20 74 6f |ch is si|milar to|
|00005bb0| 20 74 68 65 20 53 51 4c | 20 6d 65 63 68 61 6e 69 | the SQL| mechani|
|00005bc0| 73 6d 20 74 6f 20 64 65 | 66 69 6e 65 20 74 75 70 |sm to de|fine tup|
|00005bd0| 6c 65 20 76 61 72 69 61 | 62 6c 65 73 20 5b 41 53 |le varia|bles [AS|
|00005be0| 54 52 37 36 5d 2c 0a 72 | 65 70 6c 61 63 65 73 20 |TR76],.r|eplaces |
|00005bf0| 74 68 65 20 51 55 45 4c | 20 52 61 6e 67 65 20 63 |the QUEL| Range c|
|00005c00| 6f 6d 6d 61 6e 64 2e 0a | 54 68 65 20 52 61 6e 67 |ommand..|The Rang|
|00005c10| 65 20 63 6f 6d 6d 61 6e | 64 20 77 61 73 20 72 65 |e comman|d was re|
|00005c20| 6d 6f 76 65 64 20 66 72 | 6f 6d 20 74 68 65 20 71 |moved fr|om the q|
|00005c30| 75 65 72 79 20 6c 61 6e | 67 75 61 67 65 20 62 65 |uery lan|guage be|
|00005c40| 63 61 75 73 65 20 69 74 | 20 64 65 66 69 6e 65 64 |cause it| defined|
|00005c50| 20 61 20 74 75 70 6c 65 | 0a 76 61 72 69 61 62 6c | a tuple|.variabl|
|00005c60| 65 20 66 6f 72 20 74 68 | 65 20 64 75 72 61 74 69 |e for th|e durati|
|00005c70| 6f 6e 20 6f 66 20 74 68 | 65 20 63 75 72 72 65 6e |on of th|e curren|
|00005c80| 74 20 75 73 65 72 20 70 | 72 6f 67 72 61 6d 2e 0a |t user p|rogram..|
|00005c90| 42 65 63 61 75 73 65 20 | 71 75 65 72 69 65 73 20 |Because |queries |
|00005ca0| 63 61 6e 20 62 65 20 73 | 74 6f 72 65 64 20 61 73 |can be s|tored as|
|00005cb0| 20 74 68 65 20 76 61 6c | 75 65 20 6f 66 20 61 20 | the val|ue of a |
|00005cc0| 66 69 65 6c 64 2c 20 74 | 68 65 20 73 63 6f 70 65 |field, t|he scope|
|00005cd0| 20 6f 66 20 74 75 70 6c | 65 20 76 61 72 69 61 62 | of tupl|e variab|
|00005ce0| 6c 65 0a 64 65 66 69 6e | 69 74 69 6f 6e 73 20 6d |le.defin|itions m|
|00005cf0| 75 73 74 20 62 65 20 63 | 6f 6e 73 74 72 61 69 6e |ust be c|onstrain|
|00005d00| 65 64 2e 0a 54 68 65 20 | 46 72 6f 6d 2d 63 6c 61 |ed..The |From-cla|
|00005d10| 75 73 65 20 6d 61 6b 65 | 73 20 74 68 65 20 73 63 |use make|s the sc|
|00005d20| 6f 70 65 20 6f 66 20 74 | 68 65 20 64 65 66 69 6e |ope of t|he defin|
|00005d30| 69 74 69 6f 6e 20 74 68 | 65 20 63 75 72 72 65 6e |ition th|e curren|
|00005d40| 74 20 71 75 65 72 79 2e | 0a 2e 70 70 0a 54 68 69 |t query.|..pp.Thi|
|00005d50| 73 20 62 72 61 63 6b 65 | 74 20 6e 6f 74 61 74 69 |s bracke|t notati|
|00005d60| 6f 6e 20 66 6f 72 20 61 | 63 63 65 73 73 69 6e 67 |on for a|ccessing|
|00005d70| 20 68 69 73 74 6f 72 69 | 63 61 6c 20 64 61 74 61 | histori|cal data|
|00005d80| 20 69 6d 70 6c 69 63 69 | 74 6c 79 20 64 65 66 69 | implici|tly defi|
|00005d90| 6e 65 73 20 61 20 73 6e | 61 70 73 68 6f 74 0a 5b |nes a sn|apshot.[|
|00005da0| 41 44 49 42 38 30 5d 2e | 0a 54 68 65 20 69 6d 70 |ADIB80].|.The imp|
|00005db0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 71 |lementat|ion of q|
|00005dc0| 75 65 72 69 65 73 20 74 | 68 61 74 20 61 63 63 65 |ueries t|hat acce|
|00005dd0| 73 73 20 74 68 69 73 20 | 73 6e 61 70 73 68 6f 74 |ss this |snapshot|
|00005de0| 2c 20 64 65 73 63 72 69 | 62 65 64 20 69 6e 0a 64 |, descri|bed in.d|
|00005df0| 65 74 61 69 6c 20 69 6e | 20 73 65 63 74 69 6f 6e |etail in| section|
|00005e00| 20 35 2c 20 73 65 61 72 | 63 68 65 73 20 62 61 63 | 5, sear|ches bac|
|00005e10| 6b 20 74 68 72 6f 75 67 | 68 20 74 68 65 0a 68 69 |k throug|h the.hi|
|00005e20| 73 74 6f 72 79 20 6f 66 | 20 74 68 65 20 72 65 6c |story of| the rel|
|00005e30| 61 74 69 6f 6e 20 74 6f | 20 66 69 6e 64 20 74 68 |ation to| find th|
|00005e40| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 74 75 |e approp|riate tu|
|00005e50| 70 6c 65 73 2e 0a 54 68 | 65 20 75 73 65 72 20 63 |ples..Th|e user c|
|00005e60| 61 6e 20 6d 61 74 65 72 | 69 61 6c 69 7a 65 20 74 |an mater|ialize t|
|00005e70| 68 65 20 73 6e 61 70 73 | 68 6f 74 20 62 79 20 65 |he snaps|hot by e|
|00005e80| 78 65 63 75 74 69 6e 67 | 20 61 20 52 65 74 72 69 |xecuting| a Retri|
|00005e90| 65 76 65 2d 69 6e 74 6f | 20 63 6f 6d 6d 61 6e 64 |eve-into| command|
|00005ea0| 20 74 68 61 74 0a 77 69 | 6c 6c 20 6d 61 6b 65 20 | that.wi|ll make |
|00005eb0| 61 20 63 6f 70 79 20 6f | 66 20 74 68 65 20 64 61 |a copy o|f the da|
|00005ec0| 74 61 20 69 6e 20 61 6e | 6f 74 68 65 72 20 72 65 |ta in an|other re|
|00005ed0| 6c 61 74 69 6f 6e 2e 0a | 2e 70 70 0a 41 70 70 6c |lation..|.pp.Appl|
|00005ee0| 69 63 61 74 69 6f 6e 73 | 20 74 68 61 74 20 64 6f |ications| that do|
|00005ef0| 20 6e 6f 74 20 77 61 6e | 74 20 74 6f 20 73 61 76 | not wan|t to sav|
|00005f00| 65 20 68 69 73 74 6f 72 | 69 63 61 6c 20 64 61 74 |e histor|ical dat|
|00005f10| 61 20 63 61 6e 20 73 70 | 65 63 69 66 79 20 61 20 |a can sp|ecify a |
|00005f20| 63 75 74 6f 66 66 20 70 | 6f 69 6e 74 0a 66 6f 72 |cutoff p|oint.for|
|00005f30| 20 61 20 72 65 6c 61 74 | 69 6f 6e 2e 0a 44 61 74 | a relat|ion..Dat|
|00005f40| 61 20 74 68 61 74 20 69 | 73 20 6f 6c 64 65 72 20 |a that i|s older |
|00005f50| 74 68 61 6e 20 74 68 65 | 20 63 75 74 6f 66 66 20 |than the| cutoff |
|00005f60| 70 6f 69 6e 74 20 69 73 | 20 64 65 6c 65 74 65 64 |point is| deleted|
|00005f70| 20 66 72 6f 6d 20 74 68 | 65 20 64 61 74 61 62 61 | from th|e databa|
|00005f80| 73 65 2e 0a 43 75 74 6f | 66 66 20 70 6f 69 6e 74 |se..Cuto|ff point|
|00005f90| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 62 79 |s are de|fined by|
|00005fa0| 20 74 68 65 20 44 69 73 | 63 61 72 64 20 63 6f 6d | the Dis|card com|
|00005fb0| 6d 61 6e 64 2e 0a 54 68 | 65 20 63 6f 6d 6d 61 6e |mand..Th|e comman|
|00005fc0| 64 0a 2e 28 62 0a 64 69 | 73 63 61 72 64 20 45 4d |d..(b.di|scard EM|
|00005fd0| 50 20 62 65 66 6f 72 65 | 20 60 60 31 20 77 65 65 |P before| ``1 wee|
|00005fe0| 6b 27 27 0a 2e 29 62 0a | 64 65 6c 65 74 65 73 20 |k''..)b.|deletes |
|00005ff0| 64 61 74 61 20 69 6e 20 | 74 68 65 20 45 4d 50 20 |data in |the EMP |
|00006000| 72 65 6c 61 74 69 6f 6e | 20 74 68 61 74 20 69 73 |relation| that is|
|00006010| 20 6d 6f 72 65 20 74 68 | 61 6e 20 31 20 77 65 65 | more th|an 1 wee|
|00006020| 6b 20 6f 6c 64 2e 0a 54 | 68 65 20 63 6f 6d 6d 61 |k old..T|he comma|
|00006030| 6e 64 73 0a 2e 28 62 0a | 64 69 73 63 61 72 64 20 |nds..(b.|discard |
|00006040| 45 4d 50 20 62 65 66 6f | 72 65 20 60 60 6e 6f 77 |EMP befo|re ``now|
|00006050| 27 27 0a 2e 29 62 0a 61 | 6e 64 0a 2e 28 62 0a 64 |''..)b.a|nd..(b.d|
|00006060| 69 73 63 61 72 64 20 45 | 4d 50 0a 2e 29 62 0a 72 |iscard E|MP..)b.r|
|00006070| 65 74 61 69 6e 20 6f 6e | 6c 79 20 74 68 65 20 63 |etain on|ly the c|
|00006080| 75 72 72 65 6e 74 20 64 | 61 74 61 20 69 6e 20 45 |urrent d|ata in E|
|00006090| 4d 50 2e 0a 2e 70 70 0a | 49 74 20 69 73 20 61 6c |MP...pp.|It is al|
|000060a0| 73 6f 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 77 |so possi|ble to w|
|000060b0| 72 69 74 65 20 71 75 65 | 72 69 65 73 20 74 68 61 |rite que|ries tha|
|000060c0| 74 20 72 65 66 65 72 65 | 6e 63 65 20 64 61 74 61 |t refere|nce data|
|000060d0| 20 77 68 69 63 68 20 69 | 73 20 76 61 6c 69 64 20 | which i|s valid |
|000060e0| 62 65 74 77 65 65 6e 20 | 74 77 6f 20 64 61 74 65 |between |two date|
|000060f0| 73 2e 0a 54 68 65 20 6e | 6f 74 61 74 69 6f 6e 20 |s..The n|otation |
|00006100| 0a 2e 28 62 0a 72 65 6c | 61 74 69 6f 6e 2d 6e 61 |..(b.rel|ation-na|
|00006110| 6d 65 5b 64 61 74 65 31 | 2c 20 64 61 74 65 32 5d |me[date1|, date2]|
|00006120| 0a 2e 29 62 0a 73 70 65 | 63 69 66 69 65 73 20 74 |..)b.spe|cifies t|
|00006130| 68 65 20 72 65 6c 61 74 | 69 6f 6e 20 63 6f 6e 74 |he relat|ion cont|
|00006140| 61 69 6e 69 6e 67 20 61 | 6c 6c 20 74 75 70 6c 65 |aining a|ll tuple|
|00006150| 73 20 74 68 61 74 20 77 | 65 72 65 20 69 6e 20 74 |s that w|ere in t|
|00006160| 68 65 20 72 65 6c 61 74 | 69 6f 6e 20 61 74 20 73 |he relat|ion at s|
|00006170| 6f 6d 65 20 74 69 6d 65 | 20 62 65 74 77 65 65 6e |ome time| between|
|00006180| 0a 64 61 74 65 31 20 61 | 6e 64 20 64 61 74 65 32 |.date1 a|nd date2|
|00006190| 2e 0a 45 69 74 68 65 72 | 20 6f 72 20 62 6f 74 68 |..Either| or both|
|000061a0| 20 6f 66 20 74 68 65 73 | 65 20 64 61 74 65 73 20 | of thes|e dates |
|000061b0| 63 61 6e 20 62 65 20 6f | 6d 69 74 74 65 64 20 74 |can be o|mitted t|
|000061c0| 6f 20 73 70 65 63 69 66 | 79 20 61 6c 6c 20 64 61 |o specif|y all da|
|000061d0| 74 61 20 69 6e 20 74 68 | 65 20 72 65 6c 61 74 69 |ta in th|e relati|
|000061e0| 6f 6e 0a 66 72 6f 6d 20 | 74 68 65 20 74 69 6d 65 |on.from |the time|
|000061f0| 20 69 74 20 77 61 73 20 | 63 72 65 61 74 65 64 20 | it was |created |
|00006200| 75 6e 74 69 6c 20 61 20 | 66 69 78 65 64 20 64 61 |until a |fixed da|
|00006210| 74 65 20 28 69 2e 65 2e | 2c 20 72 65 6c 61 74 69 |te (i.e.|, relati|
|00006220| 6f 6e 2d 6e 61 6d 65 5b | 2c 64 61 74 65 5d 29 2c |on-name[|,date]),|
|00006230| 0a 61 6c 6c 20 64 61 74 | 61 20 69 6e 20 74 68 65 |.all dat|a in the|
|00006240| 20 72 65 6c 61 74 69 6f | 6e 20 66 72 6f 6d 20 61 | relatio|n from a|
|00006250| 20 66 69 78 65 64 20 64 | 61 74 65 20 74 6f 20 74 | fixed d|ate to t|
|00006260| 68 65 20 70 72 65 73 65 | 6e 74 20 28 69 2e 65 2e |he prese|nt (i.e.|
|00006270| 2c 20 72 65 6c 61 74 69 | 6f 6e 2d 6e 61 6d 65 5b |, relati|on-name[|
|00006280| 64 61 74 65 2c 5d 29 2c | 0a 6f 72 20 61 6c 6c 20 |date,]),|.or all |
|00006290| 64 61 74 61 20 74 68 61 | 74 20 77 61 73 20 65 76 |data tha|t was ev|
|000062a0| 65 72 79 20 69 6e 20 74 | 68 65 20 72 65 6c 61 74 |ery in t|he relat|
|000062b0| 69 6f 6e 20 28 69 2e 65 | 2e 2c 20 72 65 6c 61 74 |ion (i.e|., relat|
|000062c0| 69 6f 6e 2d 6e 61 6d 65 | 5b 5c 20 5d 29 2e 0a 46 |ion-name|[\ ])..F|
|000062d0| 6f 72 20 65 78 61 6d 70 | 6c 65 2c 20 74 68 65 20 |or examp|le, the |
|000062e0| 71 75 65 72 79 0a 2e 28 | 62 0a 72 65 74 72 69 65 |query..(|b.retrie|
|000062f0| 76 65 20 28 45 2e 61 6c | 6c 29 0a 66 72 6f 6d 20 |ve (E.al|l).from |
|00006300| 45 20 69 6e 20 45 4d 50 | 5b 5c 20 5d 0a 77 68 65 |E in EMP|[\ ].whe|
|00006310| 72 65 20 45 2e 6e 61 6d | 65 3d 60 60 53 6d 69 74 |re E.nam|e=``Smit|
|00006320| 68 27 27 0a 2e 29 62 0a | 72 65 74 75 72 6e 73 20 |h''..)b.|returns |
|00006330| 61 6c 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |all info|rmation |
|00006340| 6f 6e 20 65 6d 70 6c 6f | 79 65 65 73 20 6e 61 6d |on emplo|yees nam|
|00006350| 65 64 20 53 6d 69 74 68 | 20 77 68 6f 20 77 6f 72 |ed Smith| who wor|
|00006360| 6b 65 64 20 66 6f 72 20 | 74 68 65 0a 63 6f 6d 70 |ked for |the.comp|
|00006370| 61 6e 79 20 61 74 20 61 | 6e 79 20 74 69 6d 65 2e |any at a|ny time.|
|00006380| 0a 2e 70 70 0a 50 4f 53 | 54 51 55 45 4c 20 68 61 |..pp.POS|TQUEL ha|
|00006390| 73 20 61 20 74 68 72 65 | 65 20 6c 65 76 65 6c 20 |s a thre|e level |
|000063a0| 6d 65 6d 6f 72 79 20 68 | 69 65 72 61 72 63 68 79 |memory h|ierarchy|
|000063b0| 3a 20 31 29 20 6d 61 69 | 6e 20 6d 65 6d 6f 72 79 |: 1) mai|n memory|
|000063c0| 2c 20 32 29 20 0a 73 65 | 63 6f 6e 64 61 72 79 20 |, 2) .se|condary |
|000063d0| 6d 65 6d 6f 72 79 20 28 | 6d 61 67 6e 65 74 69 63 |memory (|magnetic|
|000063e0| 20 64 69 73 6b 29 2c 20 | 61 6e 64 20 33 29 20 74 | disk), |and 3) t|
|000063f0| 65 72 74 69 61 72 79 20 | 6d 65 6d 6f 72 79 20 28 |ertiary |memory (|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.